diff --git a/Design/wavebank/0.wav b/Design/wavebank/0.wav new file mode 100644 index 00000000..53851783 Binary files /dev/null and b/Design/wavebank/0.wav differ diff --git a/Design/wavebank/1.wav b/Design/wavebank/1.wav new file mode 100644 index 00000000..e613c275 Binary files /dev/null and b/Design/wavebank/1.wav differ diff --git a/Design/wavebank/2.wav b/Design/wavebank/2.wav new file mode 100644 index 00000000..204e92f3 Binary files /dev/null and b/Design/wavebank/2.wav differ diff --git a/Design/wavebank/3.wav b/Design/wavebank/3.wav new file mode 100644 index 00000000..0ee0b274 Binary files /dev/null and b/Design/wavebank/3.wav differ diff --git a/Design/wavebank/4.wav b/Design/wavebank/4.wav new file mode 100644 index 00000000..cd39cff9 Binary files /dev/null and b/Design/wavebank/4.wav differ diff --git a/Design/wavebank/Readme.txt b/Design/wavebank/Readme.txt new file mode 100644 index 00000000..94ee8af1 --- /dev/null +++ b/Design/wavebank/Readme.txt @@ -0,0 +1,2 @@ +How to create custom "Terraria-themed" wave bank : +xwbtool -o "Wave Bank.xwb" 0.wav 1.wav 2.wav 3.wav 4.wav \ No newline at end of file diff --git a/Design/wavebank/XWBTool.exe b/Design/wavebank/XWBTool.exe new file mode 100644 index 00000000..235dc6ca Binary files /dev/null and b/Design/wavebank/XWBTool.exe differ diff --git a/Images/shot1.png b/Images/shot1.png index d35e967a..086bf759 100644 Binary files a/Images/shot1.png and b/Images/shot1.png differ diff --git a/Images/shot2.png b/Images/shot2.png index 8e174398..c5ff0cda 100644 Binary files a/Images/shot2.png and b/Images/shot2.png differ diff --git a/Images/shot3.png b/Images/shot3.png index 494051f7..9d1093d1 100644 Binary files a/Images/shot3.png and b/Images/shot3.png differ diff --git a/Images/shot4.png b/Images/shot4.png index 92cc8fbf..2a9bd770 100644 Binary files a/Images/shot4.png and b/Images/shot4.png differ diff --git a/README.md b/README.md index c3be1bbe..427cd5ce 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,5 @@ -# mt (Modding Terraria codename; 1.0-beta-uwp branch) - -My attempt(s) to "reconsruct" some smallest and simplest game mechanics aka Terraria project :) - -## Tech. details - -:: Terraria 1.0 experimental UWP edition with special "modded" MonoGame :: +# mt-1.0-beta1 (Project [M]icro[T]erraria codename; 1.0-beta-uwp branch) +This is MINIMAL UWP Terraria app. It's my own attempt to RnD of Terraria XNA game mechanics. :: Min. Win. os build (SDK): 10240 (Astoria compatibility added) @@ -16,7 +11,9 @@ My attempt(s) to "reconsruct" some smallest and simplest game mechanics aka Terr ## Progress of porting to uwp -:: Sound effects fixed :) +:: Touch control seems to be ok... but buggy =) After long play "finger touch" counting autoincrementing occccccccurs.... =)))) + +:: Background music recovered (but wavebank after xbox->pc convert. is HUGE at now!)) :: DB storage ok @@ -28,7 +25,9 @@ My attempt(s) to "reconsruct" some smallest and simplest game mechanics aka Terr :: The app do its work only at "start mode" (minimum WASD + UpDownLeftRight keyboard control, not touchscreen event yet, sadly...) -:: No sound (wavebank WMA support not recovered, sadly), but save / restore settings (player/genworld data storage) fixed :) +:: Sounds ok, and Music ok (wavebank consists of 5 Terraria-themed WAV) + +:: Game save / restore settings (player/genworld data storage) seem to be fixed (?) too ### Content This repo contains the decompiled source of the Terraria client binaries, from version 1.0-beta founded at [Terraria-pc-version-archive site](https://archive.org/details/terraria-pc-version-archive). Decompiled with [JetBrains dotPeek](https://www.jetbrains.com/decompiler/). @@ -44,7 +43,8 @@ I am just providing the decompiled code as a reference and making it easily acce - Research game mechanics : : - Add your own game mech - Fix music : : -- Add touchscreen event handlers : : +- Upprove touchscreen event handlers : : +- Mouse handling (for desktop mode) also needed : : - Do something else (deploy to old swwet Lumia phones... why not?) : : ## Add. info / References diff --git a/Src/IonicZipFiles/AssemblyInfo.cs b/Src/IonicZipFiles/AssemblyInfo.cs deleted file mode 100644 index a69940f5..00000000 --- a/Src/IonicZipFiles/AssemblyInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: ComVisible(false)] -[assembly: Guid("4a8f7fa0-18c6-4bd4-bc85-668548cd7883")] -[assembly: AssemblyConfiguration("Retail")] -[assembly: AssemblyDescription("a library for handling zip archives, for the Compact Framework. http://www.codeplex.com/DotNetZip (Flavor=Retail)")] -[assembly: AssemblyCompany("Dino Chiesa")] -[assembly: AssemblyProduct("DotNetZip Library")] -[assembly: AssemblyCopyright("Copyright © Dino Chiesa 2006 - 2011")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyTitle("Ionic's DotNetZip CF Library")] -[assembly: AssemblyVersion("1.9.1.8")] diff --git a/Src/IonicZipFiles/BZip2/BZip2.cs b/Src/IonicZipFiles/BZip2/BZip2.cs deleted file mode 100644 index d48f21b3..00000000 --- a/Src/IonicZipFiles/BZip2/BZip2.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.BZip2.BZip2 -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.BZip2 -{ - internal static class BZip2 - { - public static readonly int BlockSizeMultiple = 100000; - public static readonly int MinBlockSize = 1; - public static readonly int MaxBlockSize = 9; - public static readonly int MaxAlphaSize = 258; - public static readonly int MaxCodeLength = 23; - public static readonly char RUNA = char.MinValue; - public static readonly char RUNB = '\u0001'; - public static readonly int NGroups = 6; - public static readonly int G_SIZE = 50; - public static readonly int N_ITERS = 4; - public static readonly int MaxSelectors = 2 + 900000 / Ionic.BZip2.BZip2.G_SIZE; - public static readonly int NUM_OVERSHOOT_BYTES = 20; - internal static readonly int QSORT_STACK_SIZE = 1000; - - internal static T[][] InitRectangularArray(int d1, int d2) - { - T[][] objArray = new T[d1][]; - for (int index = 0; index < d1; ++index) - objArray[index] = new T[d2]; - return objArray; - } - } -} diff --git a/Src/IonicZipFiles/BZip2/BZip2Compressor.cs b/Src/IonicZipFiles/BZip2/BZip2Compressor.cs deleted file mode 100644 index d6780b1d..00000000 --- a/Src/IonicZipFiles/BZip2/BZip2Compressor.cs +++ /dev/null @@ -1,1271 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.BZip2.BZip2Compressor -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Crc; -using System; - -namespace Ionic.BZip2 -{ - internal class BZip2Compressor - { - private int blockSize100k; - private int currentByte = -1; - private int runLength; - private int last; - private int outBlockFillThreshold; - private BZip2Compressor.CompressionState cstate; - private readonly CRC32 crc = new CRC32(true); - private BitWriter bw; - private int runs; - private int workDone; - private int workLimit; - private bool firstAttempt; - private bool blockRandomised; - private int origPtr; - private int nInUse; - private int nMTF; - private static readonly int SETMASK = 2097152; - private static readonly int CLEARMASK = ~BZip2Compressor.SETMASK; - private static readonly byte GREATER_ICOST = 15; - private static readonly byte LESSER_ICOST = 0; - private static readonly int SMALL_THRESH = 20; - private static readonly int DEPTH_THRESH = 10; - private static readonly int WORK_FACTOR = 30; - private static readonly int[] increments = new int[14] - { - 1, - 4, - 13, - 40, - 121, - 364, - 1093, - 3280, - 9841, - 29524, - 88573, - 265720, - 797161, - 2391484 - }; - private uint \u003CCrc32\u003Ek__BackingField; - private int \u003CAvailableBytesOut\u003Ek__BackingField; - - public BZip2Compressor(BitWriter writer) - : this(writer, Ionic.BZip2.BZip2.MaxBlockSize) - { - } - - public BZip2Compressor(BitWriter writer, int blockSize) - { - this.blockSize100k = blockSize; - this.bw = writer; - this.outBlockFillThreshold = blockSize * Ionic.BZip2.BZip2.BlockSizeMultiple - 20; - this.cstate = new BZip2Compressor.CompressionState(blockSize); - this.Reset(); - } - - private void Reset() - { - this.crc.Reset(); - this.currentByte = -1; - this.runLength = 0; - this.last = -1; - int index = 256; - while (--index >= 0) - this.cstate.inUse[index] = false; - } - - public int BlockSize => this.blockSize100k; - - public uint Crc32 - { - get => this.\u003CCrc32\u003Ek__BackingField; - private set => this.\u003CCrc32\u003Ek__BackingField = value; - } - - public int AvailableBytesOut - { - get => this.\u003CAvailableBytesOut\u003Ek__BackingField; - private set => this.\u003CAvailableBytesOut\u003Ek__BackingField = value; - } - - public int UncompressedBytes => this.last + 1; - - public int Fill(byte[] buffer, int offset, int count) - { - if (this.last >= this.outBlockFillThreshold) - return 0; - int num1 = 0; - int num2 = offset + count; - int num3; - do - { - num3 = this.write0(buffer[offset++]); - if (num3 > 0) - ++num1; - } - while (offset < num2 && num3 == 1); - return num1; - } - - private int write0(byte b) - { - if (this.currentByte == -1) - { - this.currentByte = (int) b; - ++this.runLength; - return 1; - } - if (this.currentByte == (int) b) - { - if (++this.runLength <= 254) - return 1; - bool outputBlock = this.AddRunToOutputBlock(false); - this.currentByte = -1; - this.runLength = 0; - return !outputBlock ? 1 : 2; - } - if (this.AddRunToOutputBlock(false)) - { - this.currentByte = -1; - this.runLength = 0; - return 0; - } - this.runLength = 1; - this.currentByte = (int) b; - return 1; - } - - private bool AddRunToOutputBlock(bool final) - { - ++this.runs; - int last = this.last; - if (last >= this.outBlockFillThreshold && !final) - throw new Exception(string.Format("block overrun(final={2}): {0} >= threshold ({1})", (object) last, (object) this.outBlockFillThreshold, (object) final)); - byte currentByte = (byte) this.currentByte; - byte[] block = this.cstate.block; - this.cstate.inUse[(int) currentByte] = true; - int runLength = this.runLength; - this.crc.UpdateCRC(currentByte, runLength); - switch (runLength) - { - case 1: - block[last + 2] = currentByte; - this.last = last + 1; - break; - case 2: - block[last + 2] = currentByte; - block[last + 3] = currentByte; - this.last = last + 2; - break; - case 3: - block[last + 2] = currentByte; - block[last + 3] = currentByte; - block[last + 4] = currentByte; - this.last = last + 3; - break; - default: - int index = runLength - 4; - this.cstate.inUse[index] = true; - block[last + 2] = currentByte; - block[last + 3] = currentByte; - block[last + 4] = currentByte; - block[last + 5] = currentByte; - block[last + 6] = (byte) index; - this.last = last + 5; - break; - } - return this.last >= this.outBlockFillThreshold; - } - - public void CompressAndWrite() - { - if (this.runLength > 0) - this.AddRunToOutputBlock(true); - this.currentByte = -1; - if (this.last == -1) - return; - this.blockSort(); - this.bw.WriteByte((byte) 49); - this.bw.WriteByte((byte) 65); - this.bw.WriteByte((byte) 89); - this.bw.WriteByte((byte) 38); - this.bw.WriteByte((byte) 83); - this.bw.WriteByte((byte) 89); - this.Crc32 = (uint) this.crc.Crc32Result; - this.bw.WriteInt(this.Crc32); - this.bw.WriteBits(1, this.blockRandomised ? 1U : 0U); - this.moveToFrontCodeAndSend(); - this.Reset(); - } - - private void randomiseBlock() - { - bool[] inUse = this.cstate.inUse; - byte[] block = this.cstate.block; - int last = this.last; - int index1 = 256; - while (--index1 >= 0) - inUse[index1] = false; - int num1 = 0; - int i = 0; - int num2 = 0; - int index2 = 1; - while (num2 <= last) - { - if (num1 == 0) - { - num1 = (int) (ushort) Rand.Rnums(i); - if (++i == 512) - i = 0; - } - --num1; - block[index2] ^= num1 == 1 ? (byte) 1 : (byte) 0; - inUse[(int) block[index2] & (int) byte.MaxValue] = true; - num2 = index2; - ++index2; - } - this.blockRandomised = true; - } - - private void mainSort() - { - BZip2Compressor.CompressionState cstate = this.cstate; - int[] sortRunningOrder = cstate.mainSort_runningOrder; - int[] mainSortCopy = cstate.mainSort_copy; - bool[] mainSortBigDone = cstate.mainSort_bigDone; - int[] ftab = cstate.ftab; - byte[] block = cstate.block; - int[] fmap = cstate.fmap; - char[] quadrant = cstate.quadrant; - int last = this.last; - int workLimit = this.workLimit; - bool firstAttempt = this.firstAttempt; - int index1 = 65537; - while (--index1 >= 0) - ftab[index1] = 0; - for (int index2 = 0; index2 < Ionic.BZip2.BZip2.NUM_OVERSHOOT_BYTES; ++index2) - block[last + index2 + 2] = block[index2 % (last + 1) + 1]; - int index3 = last + Ionic.BZip2.BZip2.NUM_OVERSHOOT_BYTES + 1; - while (--index3 >= 0) - quadrant[index3] = char.MinValue; - block[0] = block[last + 1]; - int num1 = (int) block[0] & (int) byte.MaxValue; - for (int index4 = 0; index4 <= last; ++index4) - { - int num2 = (int) block[index4 + 1] & (int) byte.MaxValue; - ++ftab[(num1 << 8) + num2]; - num1 = num2; - } - for (int index5 = 1; index5 <= 65536; ++index5) - ftab[index5] += ftab[index5 - 1]; - int num3 = (int) block[1] & (int) byte.MaxValue; - for (int index6 = 0; index6 < last; ++index6) - { - int num4 = (int) block[index6 + 2] & (int) byte.MaxValue; - fmap[--ftab[(num3 << 8) + num4]] = index6; - num3 = num4; - } - fmap[--ftab[(((int) block[last + 1] & (int) byte.MaxValue) << 8) + ((int) block[1] & (int) byte.MaxValue)]] = last; - int index7 = 256; - while (--index7 >= 0) - { - mainSortBigDone[index7] = false; - sortRunningOrder[index7] = index7; - } - int num5 = 364; - while (num5 != 1) - { - num5 /= 3; - for (int index8 = num5; index8 <= (int) byte.MaxValue; ++index8) - { - int num6 = sortRunningOrder[index8]; - int num7 = ftab[num6 + 1 << 8] - ftab[num6 << 8]; - int num8 = num5 - 1; - int index9 = index8; - for (int index10 = sortRunningOrder[index9 - num5]; ftab[index10 + 1 << 8] - ftab[index10 << 8] > num7; index10 = sortRunningOrder[index9 - num5]) - { - sortRunningOrder[index9] = index10; - index9 -= num5; - if (index9 <= num8) - break; - } - sortRunningOrder[index9] = num6; - } - } - for (int index11 = 0; index11 <= (int) byte.MaxValue; ++index11) - { - int index12 = sortRunningOrder[index11]; - for (int index13 = 0; index13 <= (int) byte.MaxValue; ++index13) - { - int index14 = (index12 << 8) + index13; - int num9 = ftab[index14]; - if ((num9 & BZip2Compressor.SETMASK) != BZip2Compressor.SETMASK) - { - int loSt = num9 & BZip2Compressor.CLEARMASK; - int hiSt = (ftab[index14 + 1] & BZip2Compressor.CLEARMASK) - 1; - if (hiSt > loSt) - { - this.mainQSort3(cstate, loSt, hiSt, 2); - if (firstAttempt && this.workDone > workLimit) - return; - } - ftab[index14] = num9 | BZip2Compressor.SETMASK; - } - } - for (int index15 = 0; index15 <= (int) byte.MaxValue; ++index15) - mainSortCopy[index15] = ftab[(index15 << 8) + index12] & BZip2Compressor.CLEARMASK; - int index16 = ftab[index12 << 8] & BZip2Compressor.CLEARMASK; - for (int index17 = ftab[index12 + 1 << 8] & BZip2Compressor.CLEARMASK; index16 < index17; ++index16) - { - int index18 = fmap[index16]; - int index19 = (int) block[index18] & (int) byte.MaxValue; - if (!mainSortBigDone[index19]) - { - fmap[mainSortCopy[index19]] = index18 == 0 ? last : index18 - 1; - ++mainSortCopy[index19]; - } - } - int num10 = 256; - while (--num10 >= 0) - ftab[(num10 << 8) + index12] |= BZip2Compressor.SETMASK; - mainSortBigDone[index12] = true; - if (index11 < (int) byte.MaxValue) - { - int num11 = ftab[index12 << 8] & BZip2Compressor.CLEARMASK; - int num12 = (ftab[index12 + 1 << 8] & BZip2Compressor.CLEARMASK) - num11; - int num13 = 0; - while (num12 >> num13 > 65534) - ++num13; - for (int index20 = 0; index20 < num12; ++index20) - { - int index21 = fmap[num11 + index20]; - char ch = (char) (index20 >> num13); - quadrant[index21] = ch; - if (index21 < Ionic.BZip2.BZip2.NUM_OVERSHOOT_BYTES) - quadrant[index21 + last + 1] = ch; - } - } - } - } - - private void blockSort() - { - this.workLimit = BZip2Compressor.WORK_FACTOR * this.last; - this.workDone = 0; - this.blockRandomised = false; - this.firstAttempt = true; - this.mainSort(); - if (this.firstAttempt && this.workDone > this.workLimit) - { - this.randomiseBlock(); - this.workLimit = this.workDone = 0; - this.firstAttempt = false; - this.mainSort(); - } - int[] fmap = this.cstate.fmap; - this.origPtr = -1; - int index = 0; - for (int last = this.last; index <= last; ++index) - { - if (fmap[index] == 0) - { - this.origPtr = index; - break; - } - } - } - - private bool mainSimpleSort( - BZip2Compressor.CompressionState dataShadow, - int lo, - int hi, - int d) - { - int num1 = hi - lo + 1; - if (num1 < 2) - return this.firstAttempt && this.workDone > this.workLimit; - int index1 = 0; - while (BZip2Compressor.increments[index1] < num1) - ++index1; - int[] fmap = dataShadow.fmap; - char[] quadrant = dataShadow.quadrant; - byte[] block = dataShadow.block; - int last = this.last; - int num2 = last + 1; - bool firstAttempt = this.firstAttempt; - int workLimit = this.workLimit; - int workDone = this.workDone; - while (--index1 >= 0) - { - int increment = BZip2Compressor.increments[index1]; - int num3 = lo + increment - 1; - int index2 = lo + increment; - while (index2 <= hi) - { - for (int index3 = 3; index2 <= hi && --index3 >= 0; ++index2) - { - int num4 = fmap[index2]; - int num5 = num4 + d; - int index4 = index2; - bool flag = false; - int num6 = 0; -label_11: - int num7; - int num8; - do - { - if (flag) - { - fmap[index4] = num6; - if ((index4 -= increment) <= num3) - break; - } - else - flag = true; - num6 = fmap[index4 - increment]; - num7 = num6 + d; - num8 = num5; - if ((int) block[num7 + 1] == (int) block[num8 + 1]) - { - if ((int) block[num7 + 2] == (int) block[num8 + 2]) - { - if ((int) block[num7 + 3] == (int) block[num8 + 3]) - { - if ((int) block[num7 + 4] == (int) block[num8 + 4]) - { - if ((int) block[num7 + 5] == (int) block[num8 + 5]) - { - int index5; - int index6; - if ((int) block[index5 = num7 + 6] == (int) block[index6 = num8 + 6]) - { - int num9 = last; - while (num9 > 0) - { - num9 -= 4; - if ((int) block[index5 + 1] == (int) block[index6 + 1]) - { - if ((int) quadrant[index5] == (int) quadrant[index6]) - { - if ((int) block[index5 + 2] == (int) block[index6 + 2]) - { - if ((int) quadrant[index5 + 1] == (int) quadrant[index6 + 1]) - { - if ((int) block[index5 + 3] == (int) block[index6 + 3]) - { - if ((int) quadrant[index5 + 2] == (int) quadrant[index6 + 2]) - { - if ((int) block[index5 + 4] == (int) block[index6 + 4]) - { - if ((int) quadrant[index5 + 3] == (int) quadrant[index6 + 3]) - { - if ((index5 += 4) >= num2) - index5 -= num2; - if ((index6 += 4) >= num2) - index6 -= num2; - ++workDone; - } - else - { - if ((int) quadrant[index5 + 3] <= (int) quadrant[index6 + 3]) - break; - goto label_11; - } - } - else - { - if (((int) block[index5 + 4] & (int) byte.MaxValue) <= ((int) block[index6 + 4] & (int) byte.MaxValue)) - break; - goto label_11; - } - } - else - { - if ((int) quadrant[index5 + 2] <= (int) quadrant[index6 + 2]) - break; - goto label_11; - } - } - else - { - if (((int) block[index5 + 3] & (int) byte.MaxValue) <= ((int) block[index6 + 3] & (int) byte.MaxValue)) - break; - goto label_11; - } - } - else - { - if ((int) quadrant[index5 + 1] <= (int) quadrant[index6 + 1]) - break; - goto label_11; - } - } - else - { - if (((int) block[index5 + 2] & (int) byte.MaxValue) <= ((int) block[index6 + 2] & (int) byte.MaxValue)) - break; - goto label_11; - } - } - else - { - if ((int) quadrant[index5] <= (int) quadrant[index6]) - break; - goto label_11; - } - } - else - { - if (((int) block[index5 + 1] & (int) byte.MaxValue) <= ((int) block[index6 + 1] & (int) byte.MaxValue)) - break; - goto label_11; - } - } - break; - } - if (((int) block[index5] & (int) byte.MaxValue) <= ((int) block[index6] & (int) byte.MaxValue)) - break; - } - else if (((int) block[num7 + 5] & (int) byte.MaxValue) <= ((int) block[num8 + 5] & (int) byte.MaxValue)) - break; - } - else if (((int) block[num7 + 4] & (int) byte.MaxValue) <= ((int) block[num8 + 4] & (int) byte.MaxValue)) - break; - } - else if (((int) block[num7 + 3] & (int) byte.MaxValue) <= ((int) block[num8 + 3] & (int) byte.MaxValue)) - break; - } - else if (((int) block[num7 + 2] & (int) byte.MaxValue) <= ((int) block[num8 + 2] & (int) byte.MaxValue)) - break; - } - } - while (((int) block[num7 + 1] & (int) byte.MaxValue) > ((int) block[num8 + 1] & (int) byte.MaxValue)); - fmap[index4] = num4; - } - if (firstAttempt && index2 <= hi && workDone > workLimit) - goto label_54; - } - } -label_54: - this.workDone = workDone; - return firstAttempt && workDone > workLimit; - } - - private static void vswap(int[] fmap, int p1, int p2, int n) - { - n += p1; - while (p1 < n) - { - int num = fmap[p1]; - fmap[p1++] = fmap[p2]; - fmap[p2++] = num; - } - } - - private static byte med3(byte a, byte b, byte c) - { - if ((int) a >= (int) b) - { - if ((int) b > (int) c) - return b; - return (int) a <= (int) c ? a : c; - } - if ((int) b < (int) c) - return b; - return (int) a >= (int) c ? a : c; - } - - private void mainQSort3( - BZip2Compressor.CompressionState dataShadow, - int loSt, - int hiSt, - int dSt) - { - int[] stackLl = dataShadow.stack_ll; - int[] stackHh = dataShadow.stack_hh; - int[] stackDd = dataShadow.stack_dd; - int[] fmap = dataShadow.fmap; - byte[] block = dataShadow.block; - stackLl[0] = loSt; - stackHh[0] = hiSt; - stackDd[0] = dSt; - int index1 = 1; - while (--index1 >= 0) - { - int index2 = stackLl[index1]; - int hi = stackHh[index1]; - int d = stackDd[index1]; - if (hi - index2 < BZip2Compressor.SMALL_THRESH || d > BZip2Compressor.DEPTH_THRESH) - { - if (this.mainSimpleSort(dataShadow, index2, hi, d)) - break; - } - else - { - int num1 = d + 1; - int num2 = (int) BZip2Compressor.med3(block[fmap[index2] + num1], block[fmap[hi] + num1], block[fmap[index2 + hi >> 1] + num1]) & (int) byte.MaxValue; - int p1 = index2; - int index3 = hi; - int index4 = index2; - int index5 = hi; - while (true) - { - while (p1 <= index3) - { - int num3 = ((int) block[fmap[p1] + num1] & (int) byte.MaxValue) - num2; - if (num3 == 0) - { - int num4 = fmap[p1]; - fmap[p1++] = fmap[index4]; - fmap[index4++] = num4; - } - else if (num3 < 0) - ++p1; - else - break; - } - while (p1 <= index3) - { - int num5 = ((int) block[fmap[index3] + num1] & (int) byte.MaxValue) - num2; - if (num5 == 0) - { - int num6 = fmap[index3]; - fmap[index3--] = fmap[index5]; - fmap[index5--] = num6; - } - else if (num5 > 0) - --index3; - else - break; - } - if (p1 <= index3) - { - int num7 = fmap[p1]; - fmap[p1++] = fmap[index3]; - fmap[index3--] = num7; - } - else - break; - } - if (index5 < index4) - { - stackLl[index1] = index2; - stackHh[index1] = hi; - stackDd[index1] = num1; - ++index1; - } - else - { - int n1 = index4 - index2 < p1 - index4 ? index4 - index2 : p1 - index4; - BZip2Compressor.vswap(fmap, index2, p1 - n1, n1); - int n2 = hi - index5 < index5 - index3 ? hi - index5 : index5 - index3; - BZip2Compressor.vswap(fmap, p1, hi - n2 + 1, n2); - int num8 = index2 + p1 - index4 - 1; - int num9 = hi - (index5 - index3) + 1; - stackLl[index1] = index2; - stackHh[index1] = num8; - stackDd[index1] = d; - int index6 = index1 + 1; - stackLl[index6] = num8 + 1; - stackHh[index6] = num9 - 1; - stackDd[index6] = num1; - int index7 = index6 + 1; - stackLl[index7] = num9; - stackHh[index7] = hi; - stackDd[index7] = d; - index1 = index7 + 1; - } - } - } - } - - private void generateMTFValues() - { - int last = this.last; - BZip2Compressor.CompressionState cstate = this.cstate; - bool[] inUse = cstate.inUse; - byte[] block = cstate.block; - int[] fmap = cstate.fmap; - char[] sfmap = cstate.sfmap; - int[] mtfFreq = cstate.mtfFreq; - byte[] unseqToSeq = cstate.unseqToSeq; - byte[] generateMtfValuesYy = cstate.generateMTFValues_yy; - int num1 = 0; - for (int index = 0; index < 256; ++index) - { - if (inUse[index]) - { - unseqToSeq[index] = (byte) num1; - ++num1; - } - } - this.nInUse = num1; - int index1 = num1 + 1; - for (int index2 = index1; index2 >= 0; --index2) - mtfFreq[index2] = 0; - int index3 = num1; - while (--index3 >= 0) - generateMtfValuesYy[index3] = (byte) index3; - int index4 = 0; - int num2 = 0; - for (int index5 = 0; index5 <= last; ++index5) - { - byte num3 = unseqToSeq[(int) block[fmap[index5]] & (int) byte.MaxValue]; - byte num4 = generateMtfValuesYy[0]; - int index6 = 0; - while ((int) num3 != (int) num4) - { - ++index6; - byte num5 = num4; - num4 = generateMtfValuesYy[index6]; - generateMtfValuesYy[index6] = num5; - } - generateMtfValuesYy[0] = num4; - if (index6 == 0) - { - ++num2; - } - else - { - if (num2 > 0) - { - int num6 = num2 - 1; - while (true) - { - if ((num6 & 1) == 0) - { - sfmap[index4] = Ionic.BZip2.BZip2.RUNA; - ++index4; - ++mtfFreq[(int) Ionic.BZip2.BZip2.RUNA]; - } - else - { - sfmap[index4] = Ionic.BZip2.BZip2.RUNB; - ++index4; - ++mtfFreq[(int) Ionic.BZip2.BZip2.RUNB]; - } - if (num6 >= 2) - num6 = num6 - 2 >> 1; - else - break; - } - num2 = 0; - } - sfmap[index4] = (char) (index6 + 1); - ++index4; - ++mtfFreq[index6 + 1]; - } - } - if (num2 > 0) - { - int num7 = num2 - 1; - while (true) - { - if ((num7 & 1) == 0) - { - sfmap[index4] = Ionic.BZip2.BZip2.RUNA; - ++index4; - ++mtfFreq[(int) Ionic.BZip2.BZip2.RUNA]; - } - else - { - sfmap[index4] = Ionic.BZip2.BZip2.RUNB; - ++index4; - ++mtfFreq[(int) Ionic.BZip2.BZip2.RUNB]; - } - if (num7 >= 2) - num7 = num7 - 2 >> 1; - else - break; - } - } - sfmap[index4] = (char) index1; - ++mtfFreq[index1]; - this.nMTF = index4 + 1; - } - - private static void hbAssignCodes( - int[] code, - byte[] length, - int minLen, - int maxLen, - int alphaSize) - { - int num = 0; - for (int index1 = minLen; index1 <= maxLen; ++index1) - { - for (int index2 = 0; index2 < alphaSize; ++index2) - { - if (((int) length[index2] & (int) byte.MaxValue) == index1) - { - code[index2] = num; - ++num; - } - } - num <<= 1; - } - } - - private void sendMTFValues() - { - byte[][] sendMtfValuesLen = this.cstate.sendMTFValues_len; - int alphaSize = this.nInUse + 2; - int ngroups = Ionic.BZip2.BZip2.NGroups; - while (--ngroups >= 0) - { - byte[] numArray = sendMtfValuesLen[ngroups]; - int index = alphaSize; - while (--index >= 0) - numArray[index] = BZip2Compressor.GREATER_ICOST; - } - int nGroups = this.nMTF < 200 ? 2 : (this.nMTF < 600 ? 3 : (this.nMTF < 1200 ? 4 : (this.nMTF < 2400 ? 5 : 6))); - this.sendMTFValues0(nGroups, alphaSize); - int nSelectors = this.sendMTFValues1(nGroups, alphaSize); - this.sendMTFValues2(nGroups, nSelectors); - this.sendMTFValues3(nGroups, alphaSize); - this.sendMTFValues4(); - this.sendMTFValues5(nGroups, nSelectors); - this.sendMTFValues6(nGroups, alphaSize); - this.sendMTFValues7(nSelectors); - } - - private void sendMTFValues0(int nGroups, int alphaSize) - { - byte[][] sendMtfValuesLen = this.cstate.sendMTFValues_len; - int[] mtfFreq = this.cstate.mtfFreq; - int nMtf = this.nMTF; - int num1 = 0; - for (int index1 = nGroups; index1 > 0; --index1) - { - int num2 = nMtf / index1; - int num3 = num1 - 1; - int num4 = 0; - int num5 = alphaSize - 1; - while (num4 < num2 && num3 < num5) - num4 += mtfFreq[++num3]; - if (num3 > num1 && index1 != nGroups && index1 != 1 && (nGroups - index1 & 1) != 0) - num4 -= mtfFreq[num3--]; - byte[] numArray = sendMtfValuesLen[index1 - 1]; - int index2 = alphaSize; - while (--index2 >= 0) - numArray[index2] = index2 < num1 || index2 > num3 ? BZip2Compressor.GREATER_ICOST : BZip2Compressor.LESSER_ICOST; - num1 = num3 + 1; - nMtf -= num4; - } - } - - private static void hbMakeCodeLengths( - byte[] len, - int[] freq, - BZip2Compressor.CompressionState state1, - int alphaSize, - int maxLen) - { - int[] heap = state1.heap; - int[] weight = state1.weight; - int[] parent = state1.parent; - int index1 = alphaSize; - while (--index1 >= 0) - weight[index1 + 1] = (freq[index1] == 0 ? 1 : freq[index1]) << 8; - bool flag = true; - while (flag) - { - flag = false; - int index2 = alphaSize; - int index3 = 0; - heap[0] = 0; - weight[0] = 0; - parent[0] = -2; - for (int index4 = 1; index4 <= alphaSize; ++index4) - { - parent[index4] = -1; - ++index3; - heap[index3] = index4; - int index5 = index3; - int index6; - for (index6 = heap[index5]; weight[index6] < weight[heap[index5 >> 1]]; index5 >>= 1) - heap[index5] = heap[index5 >> 1]; - heap[index5] = index6; - } - while (index3 > 1) - { - int index7 = heap[1]; - heap[1] = heap[index3]; - int index8 = index3 - 1; - int num1 = 0; - int index9 = 1; - int index10 = heap[1]; - while (true) - { - int index11 = index9 << 1; - if (index11 <= index8) - { - if (index11 < index8 && weight[heap[index11 + 1]] < weight[heap[index11]]) - ++index11; - if (weight[index10] >= weight[heap[index11]]) - { - heap[index9] = heap[index11]; - index9 = index11; - } - else - break; - } - else - break; - } - heap[index9] = index10; - int index12 = heap[1]; - heap[1] = heap[index8]; - int num2 = index8 - 1; - num1 = 0; - int index13 = 1; - int index14 = heap[1]; - while (true) - { - int index15 = index13 << 1; - if (index15 <= num2) - { - if (index15 < num2 && weight[heap[index15 + 1]] < weight[heap[index15]]) - ++index15; - if (weight[index14] >= weight[heap[index15]]) - { - heap[index13] = heap[index15]; - index13 = index15; - } - else - break; - } - else - break; - } - heap[index13] = index14; - ++index2; - parent[index7] = parent[index12] = index2; - int num3 = weight[index7]; - int num4 = weight[index12]; - weight[index2] = (num3 & -256) + (num4 & -256) | 1 + ((num3 & (int) byte.MaxValue) > (num4 & (int) byte.MaxValue) ? num3 & (int) byte.MaxValue : num4 & (int) byte.MaxValue); - parent[index2] = -1; - index3 = num2 + 1; - heap[index3] = index2; - int index16 = index3; - int index17 = heap[index16]; - for (int index18 = weight[index17]; index18 < weight[heap[index16 >> 1]]; index16 >>= 1) - heap[index16] = heap[index16 >> 1]; - heap[index16] = index17; - } - for (int index19 = 1; index19 <= alphaSize; ++index19) - { - int num5 = 0; - int index20 = index19; - int num6; - while ((num6 = parent[index20]) >= 0) - { - index20 = num6; - ++num5; - } - len[index19 - 1] = (byte) num5; - if (num5 > maxLen) - flag = true; - } - if (flag) - { - for (int index21 = 1; index21 < alphaSize; ++index21) - { - int num = 1 + (weight[index21] >> 8 >> 1); - weight[index21] = num << 8; - } - } - } - } - - private int sendMTFValues1(int nGroups, int alphaSize) - { - BZip2Compressor.CompressionState cstate = this.cstate; - int[][] sendMtfValuesRfreq = cstate.sendMTFValues_rfreq; - int[] sendMtfValuesFave = cstate.sendMTFValues_fave; - short[] sendMtfValuesCost = cstate.sendMTFValues_cost; - char[] sfmap = cstate.sfmap; - byte[] selector = cstate.selector; - byte[][] sendMtfValuesLen = cstate.sendMTFValues_len; - byte[] numArray1 = sendMtfValuesLen[0]; - byte[] numArray2 = sendMtfValuesLen[1]; - byte[] numArray3 = sendMtfValuesLen[2]; - byte[] numArray4 = sendMtfValuesLen[3]; - byte[] numArray5 = sendMtfValuesLen[4]; - byte[] numArray6 = sendMtfValuesLen[5]; - int nMtf = this.nMTF; - int index1 = 0; - for (int index2 = 0; index2 < Ionic.BZip2.BZip2.N_ITERS; ++index2) - { - int index3 = nGroups; - while (--index3 >= 0) - { - sendMtfValuesFave[index3] = 0; - int[] numArray7 = sendMtfValuesRfreq[index3]; - int index4 = alphaSize; - while (--index4 >= 0) - numArray7[index4] = 0; - } - index1 = 0; - int num1; - for (int index5 = 0; index5 < this.nMTF; index5 = num1 + 1) - { - num1 = Math.Min(index5 + Ionic.BZip2.BZip2.G_SIZE - 1, nMtf - 1); - if (nGroups == Ionic.BZip2.BZip2.NGroups) - { - int[] numArray8 = new int[6]; - for (int index6 = index5; index6 <= num1; ++index6) - { - int index7 = (int) sfmap[index6]; - numArray8[0] += (int) numArray1[index7] & (int) byte.MaxValue; - numArray8[1] += (int) numArray2[index7] & (int) byte.MaxValue; - numArray8[2] += (int) numArray3[index7] & (int) byte.MaxValue; - numArray8[3] += (int) numArray4[index7] & (int) byte.MaxValue; - numArray8[4] += (int) numArray5[index7] & (int) byte.MaxValue; - numArray8[5] += (int) numArray6[index7] & (int) byte.MaxValue; - } - sendMtfValuesCost[0] = (short) numArray8[0]; - sendMtfValuesCost[1] = (short) numArray8[1]; - sendMtfValuesCost[2] = (short) numArray8[2]; - sendMtfValuesCost[3] = (short) numArray8[3]; - sendMtfValuesCost[4] = (short) numArray8[4]; - sendMtfValuesCost[5] = (short) numArray8[5]; - } - else - { - int index8 = nGroups; - while (--index8 >= 0) - sendMtfValuesCost[index8] = (short) 0; - for (int index9 = index5; index9 <= num1; ++index9) - { - int index10 = (int) sfmap[index9]; - int index11 = nGroups; - while (--index11 >= 0) - sendMtfValuesCost[index11] += (short) ((int) sendMtfValuesLen[index11][index10] & (int) byte.MaxValue); - } - } - int index12 = -1; - int index13 = nGroups; - int num2 = 999999999; - while (--index13 >= 0) - { - int num3 = (int) sendMtfValuesCost[index13]; - if (num3 < num2) - { - num2 = num3; - index12 = index13; - } - } - ++sendMtfValuesFave[index12]; - selector[index1] = (byte) index12; - ++index1; - int[] numArray9 = sendMtfValuesRfreq[index12]; - for (int index14 = index5; index14 <= num1; ++index14) - ++numArray9[(int) sfmap[index14]]; - } - for (int index15 = 0; index15 < nGroups; ++index15) - BZip2Compressor.hbMakeCodeLengths(sendMtfValuesLen[index15], sendMtfValuesRfreq[index15], this.cstate, alphaSize, 20); - } - return index1; - } - - private void sendMTFValues2(int nGroups, int nSelectors) - { - BZip2Compressor.CompressionState cstate = this.cstate; - byte[] sendMtfValues2Pos = cstate.sendMTFValues2_pos; - int index1 = nGroups; - while (--index1 >= 0) - sendMtfValues2Pos[index1] = (byte) index1; - for (int index2 = 0; index2 < nSelectors; ++index2) - { - byte num1 = cstate.selector[index2]; - byte num2 = sendMtfValues2Pos[0]; - int index3 = 0; - while ((int) num1 != (int) num2) - { - ++index3; - byte num3 = num2; - num2 = sendMtfValues2Pos[index3]; - sendMtfValues2Pos[index3] = num3; - } - sendMtfValues2Pos[0] = num2; - cstate.selectorMtf[index2] = (byte) index3; - } - } - - private void sendMTFValues3(int nGroups, int alphaSize) - { - int[][] sendMtfValuesCode = this.cstate.sendMTFValues_code; - byte[][] sendMtfValuesLen = this.cstate.sendMTFValues_len; - for (int index1 = 0; index1 < nGroups; ++index1) - { - int minLen = 32; - int maxLen = 0; - byte[] numArray = sendMtfValuesLen[index1]; - int index2 = alphaSize; - while (--index2 >= 0) - { - int num = (int) numArray[index2] & (int) byte.MaxValue; - if (num > maxLen) - maxLen = num; - if (num < minLen) - minLen = num; - } - BZip2Compressor.hbAssignCodes(sendMtfValuesCode[index1], sendMtfValuesLen[index1], minLen, maxLen, alphaSize); - } - } - - private void sendMTFValues4() - { - bool[] inUse = this.cstate.inUse; - bool[] mtfValues4InUse16 = this.cstate.sentMTFValues4_inUse16; - int index1 = 16; - while (--index1 >= 0) - { - mtfValues4InUse16[index1] = false; - int num1 = index1 * 16; - int num2 = 16; - while (--num2 >= 0) - { - if (inUse[num1 + num2]) - mtfValues4InUse16[index1] = true; - } - } - uint num3 = 0; - for (int index2 = 0; index2 < 16; ++index2) - { - if (mtfValues4InUse16[index2]) - num3 |= (uint) (1 << 16 - index2 - 1); - } - this.bw.WriteBits(16, num3); - for (int index3 = 0; index3 < 16; ++index3) - { - if (mtfValues4InUse16[index3]) - { - int num4 = index3 * 16; - uint num5 = 0; - for (int index4 = 0; index4 < 16; ++index4) - { - if (inUse[num4 + index4]) - num5 |= (uint) (1 << 16 - index4 - 1); - } - this.bw.WriteBits(16, num5); - } - } - } - - private void sendMTFValues5(int nGroups, int nSelectors) - { - this.bw.WriteBits(3, (uint) nGroups); - this.bw.WriteBits(15, (uint) nSelectors); - byte[] selectorMtf = this.cstate.selectorMtf; - for (int index1 = 0; index1 < nSelectors; ++index1) - { - int num = 0; - for (int index2 = (int) selectorMtf[index1] & (int) byte.MaxValue; num < index2; ++num) - this.bw.WriteBits(1, 1U); - this.bw.WriteBits(1, 0U); - } - } - - private void sendMTFValues6(int nGroups, int alphaSize) - { - byte[][] sendMtfValuesLen = this.cstate.sendMTFValues_len; - for (int index1 = 0; index1 < nGroups; ++index1) - { - byte[] numArray = sendMtfValuesLen[index1]; - uint num1 = (uint) numArray[0] & (uint) byte.MaxValue; - this.bw.WriteBits(5, num1); - for (int index2 = 0; index2 < alphaSize; ++index2) - { - int num2; - for (num2 = (int) numArray[index2] & (int) byte.MaxValue; (long) num1 < (long) num2; ++num1) - this.bw.WriteBits(2, 2U); - for (; (long) num1 > (long) num2; --num1) - this.bw.WriteBits(2, 3U); - this.bw.WriteBits(1, 0U); - } - } - } - - private void sendMTFValues7(int nSelectors) - { - byte[][] sendMtfValuesLen = this.cstate.sendMTFValues_len; - int[][] sendMtfValuesCode = this.cstate.sendMTFValues_code; - byte[] selector = this.cstate.selector; - char[] sfmap = this.cstate.sfmap; - int nMtf = this.nMTF; - int index1 = 0; - int index2 = 0; - while (index2 < nMtf) - { - int num = Math.Min(index2 + Ionic.BZip2.BZip2.G_SIZE - 1, nMtf - 1); - int index3 = (int) selector[index1] & (int) byte.MaxValue; - int[] numArray1 = sendMtfValuesCode[index3]; - byte[] numArray2 = sendMtfValuesLen[index3]; - for (; index2 <= num; ++index2) - { - int index4 = (int) sfmap[index2]; - this.bw.WriteBits((int) numArray2[index4] & (int) byte.MaxValue, (uint) numArray1[index4]); - } - index2 = num + 1; - ++index1; - } - } - - private void moveToFrontCodeAndSend() - { - this.bw.WriteBits(24, (uint) this.origPtr); - this.generateMTFValues(); - this.sendMTFValues(); - } - - private class CompressionState - { - public readonly bool[] inUse = new bool[256]; - public readonly byte[] unseqToSeq = new byte[256]; - public readonly int[] mtfFreq = new int[Ionic.BZip2.BZip2.MaxAlphaSize]; - public readonly byte[] selector = new byte[Ionic.BZip2.BZip2.MaxSelectors]; - public readonly byte[] selectorMtf = new byte[Ionic.BZip2.BZip2.MaxSelectors]; - public readonly byte[] generateMTFValues_yy = new byte[256]; - public byte[][] sendMTFValues_len; - public int[][] sendMTFValues_rfreq; - public readonly int[] sendMTFValues_fave = new int[Ionic.BZip2.BZip2.NGroups]; - public readonly short[] sendMTFValues_cost = new short[Ionic.BZip2.BZip2.NGroups]; - public int[][] sendMTFValues_code; - public readonly byte[] sendMTFValues2_pos = new byte[Ionic.BZip2.BZip2.NGroups]; - public readonly bool[] sentMTFValues4_inUse16 = new bool[16]; - public readonly int[] stack_ll = new int[Ionic.BZip2.BZip2.QSORT_STACK_SIZE]; - public readonly int[] stack_hh = new int[Ionic.BZip2.BZip2.QSORT_STACK_SIZE]; - public readonly int[] stack_dd = new int[Ionic.BZip2.BZip2.QSORT_STACK_SIZE]; - public readonly int[] mainSort_runningOrder = new int[256]; - public readonly int[] mainSort_copy = new int[256]; - public readonly bool[] mainSort_bigDone = new bool[256]; - public int[] heap = new int[Ionic.BZip2.BZip2.MaxAlphaSize + 2]; - public int[] weight = new int[Ionic.BZip2.BZip2.MaxAlphaSize * 2]; - public int[] parent = new int[Ionic.BZip2.BZip2.MaxAlphaSize * 2]; - public readonly int[] ftab = new int[65537]; - public byte[] block; - public int[] fmap; - public char[] sfmap; - public char[] quadrant; - - public CompressionState(int blockSize100k) - { - int length = blockSize100k * Ionic.BZip2.BZip2.BlockSizeMultiple; - this.block = new byte[length + 1 + Ionic.BZip2.BZip2.NUM_OVERSHOOT_BYTES]; - this.fmap = new int[length]; - this.sfmap = new char[2 * length]; - this.quadrant = this.sfmap; - this.sendMTFValues_len = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - this.sendMTFValues_rfreq = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - this.sendMTFValues_code = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - } - } - } -} diff --git a/Src/IonicZipFiles/BZip2/BZip2InputStream.cs b/Src/IonicZipFiles/BZip2/BZip2InputStream.cs deleted file mode 100644 index e80c663a..00000000 --- a/Src/IonicZipFiles/BZip2/BZip2InputStream.cs +++ /dev/null @@ -1,837 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.BZip2.BZip2InputStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Crc; -using System; -using System.IO; - -namespace Ionic.BZip2 -{ - public class BZip2InputStream : Stream - { - private bool _disposed; - private bool _leaveOpen; - private long totalBytesRead; - private int last; - private int origPtr; - private int blockSize100k; - private bool blockRandomised; - private int bsBuff; - private int bsLive; - private readonly CRC32 crc = new CRC32(true); - private int nInUse; - private Stream input; - private int currentChar = -1; - private BZip2InputStream.CState currentState = BZip2InputStream.CState.START_BLOCK; - private uint storedBlockCRC; - private uint storedCombinedCRC; - private uint computedBlockCRC; - private uint computedCombinedCRC; - private int su_count; - private int su_ch2; - private int su_chPrev; - private int su_i2; - private int su_j2; - private int su_rNToGo; - private int su_rTPos; - private int su_tPos; - private char su_z; - private BZip2InputStream.DecompressionState data; - - public BZip2InputStream(Stream input) - : this(input, false) - { - } - - public BZip2InputStream(Stream input, bool leaveOpen) - { - this.input = input; - this._leaveOpen = leaveOpen; - this.init(); - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (offset < 0) - throw new IndexOutOfRangeException(string.Format("offset ({0}) must be > 0", (object) offset)); - if (count < 0) - throw new IndexOutOfRangeException(string.Format("count ({0}) must be > 0", (object) count)); - if (offset + count > buffer.Length) - throw new IndexOutOfRangeException(string.Format("offset({0}) count({1}) bLength({2})", (object) offset, (object) count, (object) buffer.Length)); - if (this.input == null) - throw new IOException("the stream is not open"); - int num1 = offset + count; - int num2 = offset; - int num3; - while (num2 < num1 && (num3 = this.ReadByte()) >= 0) - buffer[num2++] = (byte) num3; - return num2 != offset ? num2 - offset : -1; - } - - private void MakeMaps() - { - bool[] inUse = this.data.inUse; - byte[] seqToUnseq = this.data.seqToUnseq; - int num = 0; - for (int index = 0; index < 256; ++index) - { - if (inUse[index]) - seqToUnseq[num++] = (byte) index; - } - this.nInUse = num; - } - - public override int ReadByte() - { - int currentChar = this.currentChar; - ++this.totalBytesRead; - switch (this.currentState) - { - case BZip2InputStream.CState.EOF: - return -1; - case BZip2InputStream.CState.START_BLOCK: - throw new IOException("bad state"); - case BZip2InputStream.CState.RAND_PART_A: - throw new IOException("bad state"); - case BZip2InputStream.CState.RAND_PART_B: - this.SetupRandPartB(); - break; - case BZip2InputStream.CState.RAND_PART_C: - this.SetupRandPartC(); - break; - case BZip2InputStream.CState.NO_RAND_PART_A: - throw new IOException("bad state"); - case BZip2InputStream.CState.NO_RAND_PART_B: - this.SetupNoRandPartB(); - break; - case BZip2InputStream.CState.NO_RAND_PART_C: - this.SetupNoRandPartC(); - break; - default: - throw new IOException("bad state"); - } - return currentChar; - } - - public override bool CanRead - { - get - { - if (this._disposed) - throw new ObjectDisposedException("BZip2Stream"); - return this.input.CanRead; - } - } - - public override bool CanSeek => false; - - public override bool CanWrite - { - get - { - if (this._disposed) - throw new ObjectDisposedException("BZip2Stream"); - return this.input.CanWrite; - } - } - - public override void Flush() - { - if (this._disposed) - throw new ObjectDisposedException("BZip2Stream"); - this.input.Flush(); - } - - public override long Length => throw new NotImplementedException(); - - public override long Position - { - get => this.totalBytesRead; - set => throw new NotImplementedException(); - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotImplementedException(); - - public override void SetLength(long value) => throw new NotImplementedException(); - - public override void Write(byte[] buffer, int offset, int count) => throw new NotImplementedException(); - - protected override void Dispose(bool disposing) - { - try - { - if (this._disposed) - return; - if (disposing && this.input != null) - this.input.Close(); - this._disposed = true; - } - finally - { - base.Dispose(disposing); - } - } - - private void init() - { - if (this.input == null) - throw new IOException("No input Stream"); - if (!this.input.CanRead) - throw new IOException("Unreadable input Stream"); - this.CheckMagicChar('B', 0); - this.CheckMagicChar('Z', 1); - this.CheckMagicChar('h', 2); - int num = this.input.ReadByte(); - if (num < 49 || num > 57) - throw new IOException("Stream is not BZip2 formatted: illegal blocksize " + (object) (char) num); - this.blockSize100k = num - 48; - this.InitBlock(); - this.SetupBlock(); - } - - private void CheckMagicChar(char expected, int position) - { - int num = this.input.ReadByte(); - if (num != (int) expected) - throw new IOException(string.Format("Not a valid BZip2 stream. byte {0}, expected '{1}', got '{2}'", (object) position, (object) (int) expected, (object) num)); - } - - private void InitBlock() - { - char ubyte1 = this.bsGetUByte(); - char ubyte2 = this.bsGetUByte(); - char ubyte3 = this.bsGetUByte(); - char ubyte4 = this.bsGetUByte(); - char ubyte5 = this.bsGetUByte(); - char ubyte6 = this.bsGetUByte(); - if (ubyte1 == '\u0017' && ubyte2 == 'r' && ubyte3 == 'E' && ubyte4 == '8' && ubyte5 == 'P' && ubyte6 == '\u0090') - { - this.complete(); - } - else - { - if (ubyte1 != '1' || ubyte2 != 'A' || ubyte3 != 'Y' || ubyte4 != '&' || ubyte5 != 'S' || ubyte6 != 'Y') - { - this.currentState = BZip2InputStream.CState.EOF; - throw new IOException(string.Format("bad block header at offset 0x{0:X}", (object) this.input.Position)); - } - this.storedBlockCRC = this.bsGetInt(); - this.blockRandomised = this.GetBits(1) == 1; - if (this.data == null) - this.data = new BZip2InputStream.DecompressionState(this.blockSize100k); - this.getAndMoveToFrontDecode(); - this.crc.Reset(); - this.currentState = BZip2InputStream.CState.START_BLOCK; - } - } - - private void EndBlock() - { - this.computedBlockCRC = (uint) this.crc.Crc32Result; - if ((int) this.storedBlockCRC != (int) this.computedBlockCRC) - throw new IOException(string.Format("BZip2 CRC error (expected {0:X8}, computed {1:X8})", (object) this.storedBlockCRC, (object) this.computedBlockCRC)); - this.computedCombinedCRC = this.computedCombinedCRC << 1 | this.computedCombinedCRC >> 31; - this.computedCombinedCRC ^= this.computedBlockCRC; - } - - private void complete() - { - this.storedCombinedCRC = this.bsGetInt(); - this.currentState = BZip2InputStream.CState.EOF; - this.data = (BZip2InputStream.DecompressionState) null; - if ((int) this.storedCombinedCRC != (int) this.computedCombinedCRC) - throw new IOException(string.Format("BZip2 CRC error (expected {0:X8}, computed {1:X8})", (object) this.storedCombinedCRC, (object) this.computedCombinedCRC)); - } - - public override void Close() - { - Stream input = this.input; - if (input == null) - return; - try - { - if (this._leaveOpen) - return; - input.Close(); - } - finally - { - this.data = (BZip2InputStream.DecompressionState) null; - this.input = (Stream) null; - } - } - - private int GetBits(int n) - { - int bsLive = this.bsLive; - int num1 = this.bsBuff; - if (bsLive < n) - { - do - { - int num2 = this.input.ReadByte(); - if (num2 < 0) - throw new IOException("unexpected end of stream"); - num1 = num1 << 8 | num2; - bsLive += 8; - } - while (bsLive < n); - this.bsBuff = num1; - } - this.bsLive = bsLive - n; - return num1 >> bsLive - n & (1 << n) - 1; - } - - private bool bsGetBit() => this.GetBits(1) != 0; - - private char bsGetUByte() => (char) this.GetBits(8); - - private uint bsGetInt() => (uint) (((this.GetBits(8) << 8 | this.GetBits(8)) << 8 | this.GetBits(8)) << 8 | this.GetBits(8)); - - private static void hbCreateDecodeTables( - int[] limit, - int[] bbase, - int[] perm, - char[] length, - int minLen, - int maxLen, - int alphaSize) - { - int num1 = minLen; - int num2 = 0; - for (; num1 <= maxLen; ++num1) - { - for (int index = 0; index < alphaSize; ++index) - { - if ((int) length[index] == num1) - perm[num2++] = index; - } - } - int maxCodeLength = Ionic.BZip2.BZip2.MaxCodeLength; - while (--maxCodeLength > 0) - { - bbase[maxCodeLength] = 0; - limit[maxCodeLength] = 0; - } - for (int index = 0; index < alphaSize; ++index) - ++bbase[(int) length[index] + 1]; - int index1 = 1; - int num3 = bbase[0]; - for (; index1 < Ionic.BZip2.BZip2.MaxCodeLength; ++index1) - { - num3 += bbase[index1]; - bbase[index1] = num3; - } - int index2 = minLen; - int num4 = 0; - int num5 = bbase[index2]; - for (; index2 <= maxLen; ++index2) - { - int num6 = bbase[index2 + 1]; - int num7 = num4 + (num6 - num5); - num5 = num6; - limit[index2] = num7 - 1; - num4 = num7 << 1; - } - for (int index3 = minLen + 1; index3 <= maxLen; ++index3) - bbase[index3] = (limit[index3 - 1] + 1 << 1) - bbase[index3]; - } - - private void recvDecodingTables() - { - BZip2InputStream.DecompressionState data = this.data; - bool[] inUse = data.inUse; - byte[] decodingTablesPos = data.recvDecodingTables_pos; - int num1 = 0; - for (int index = 0; index < 16; ++index) - { - if (this.bsGetBit()) - num1 |= 1 << index; - } - int index1 = 256; - while (--index1 >= 0) - inUse[index1] = false; - for (int index2 = 0; index2 < 16; ++index2) - { - if ((num1 & 1 << index2) != 0) - { - int num2 = index2 << 4; - for (int index3 = 0; index3 < 16; ++index3) - { - if (this.bsGetBit()) - inUse[num2 + index3] = true; - } - } - } - this.MakeMaps(); - int alphaSize = this.nInUse + 2; - int bits1 = this.GetBits(3); - int bits2 = this.GetBits(15); - for (int index4 = 0; index4 < bits2; ++index4) - { - int num3 = 0; - while (this.bsGetBit()) - ++num3; - data.selectorMtf[index4] = (byte) num3; - } - int index5 = bits1; - while (--index5 >= 0) - decodingTablesPos[index5] = (byte) index5; - for (int index6 = 0; index6 < bits2; ++index6) - { - int index7 = (int) data.selectorMtf[index6]; - byte num4 = decodingTablesPos[index7]; - for (; index7 > 0; --index7) - decodingTablesPos[index7] = decodingTablesPos[index7 - 1]; - decodingTablesPos[0] = num4; - data.selector[index6] = num4; - } - char[][] tempCharArray2d = data.temp_charArray2d; - for (int index8 = 0; index8 < bits1; ++index8) - { - int bits3 = this.GetBits(5); - char[] chArray = tempCharArray2d[index8]; - for (int index9 = 0; index9 < alphaSize; ++index9) - { - while (this.bsGetBit()) - bits3 += this.bsGetBit() ? -1 : 1; - chArray[index9] = (char) bits3; - } - } - this.createHuffmanDecodingTables(alphaSize, bits1); - } - - private void createHuffmanDecodingTables(int alphaSize, int nGroups) - { - BZip2InputStream.DecompressionState data = this.data; - char[][] tempCharArray2d = data.temp_charArray2d; - for (int index1 = 0; index1 < nGroups; ++index1) - { - int minLen = 32; - int maxLen = 0; - char[] chArray = tempCharArray2d[index1]; - int index2 = alphaSize; - while (--index2 >= 0) - { - char ch = chArray[index2]; - if ((int) ch > maxLen) - maxLen = (int) ch; - if ((int) ch < minLen) - minLen = (int) ch; - } - BZip2InputStream.hbCreateDecodeTables(data.gLimit[index1], data.gBase[index1], data.gPerm[index1], tempCharArray2d[index1], minLen, maxLen, alphaSize); - data.gMinlen[index1] = minLen; - } - } - - private void getAndMoveToFrontDecode() - { - BZip2InputStream.DecompressionState data = this.data; - this.origPtr = this.GetBits(24); - if (this.origPtr < 0) - throw new IOException("BZ_DATA_ERROR"); - if (this.origPtr > 10 + Ionic.BZip2.BZip2.BlockSizeMultiple * this.blockSize100k) - throw new IOException("BZ_DATA_ERROR"); - this.recvDecodingTables(); - byte[] moveToFrontDecodeYy = data.getAndMoveToFrontDecode_yy; - int num1 = this.blockSize100k * Ionic.BZip2.BZip2.BlockSizeMultiple; - int index1 = 256; - while (--index1 >= 0) - { - moveToFrontDecodeYy[index1] = (byte) index1; - data.unzftab[index1] = 0; - } - int index2 = 0; - int num2 = Ionic.BZip2.BZip2.G_SIZE - 1; - int num3 = this.nInUse + 1; - int moveToFrontDecode0 = this.getAndMoveToFrontDecode0(0); - int num4 = this.bsBuff; - int bsLive = this.bsLive; - int index3 = -1; - int index4 = (int) data.selector[index2] & (int) byte.MaxValue; - int[] numArray1 = data.gBase[index4]; - int[] numArray2 = data.gLimit[index4]; - int[] numArray3 = data.gPerm[index4]; - int num5 = data.gMinlen[index4]; - while (moveToFrontDecode0 != num3) - { - if (moveToFrontDecode0 == (int) Ionic.BZip2.BZip2.RUNA || moveToFrontDecode0 == (int) Ionic.BZip2.BZip2.RUNB) - { - int num6 = -1; - int num7 = 1; - while (true) - { - if (moveToFrontDecode0 == (int) Ionic.BZip2.BZip2.RUNA) - num6 += num7; - else if (moveToFrontDecode0 == (int) Ionic.BZip2.BZip2.RUNB) - num6 += num7 << 1; - else - break; - if (num2 == 0) - { - num2 = Ionic.BZip2.BZip2.G_SIZE - 1; - int index5 = (int) data.selector[++index2] & (int) byte.MaxValue; - numArray1 = data.gBase[index5]; - numArray2 = data.gLimit[index5]; - numArray3 = data.gPerm[index5]; - num5 = data.gMinlen[index5]; - } - else - --num2; - int index6; - for (index6 = num5; bsLive < index6; bsLive += 8) - { - int num8 = this.input.ReadByte(); - if (num8 < 0) - throw new IOException("unexpected end of stream"); - num4 = num4 << 8 | num8; - } - int num9 = num4 >> bsLive - index6 & (1 << index6) - 1; - bsLive -= index6; - for (; num9 > numArray2[index6]; num9 = num9 << 1 | num4 >> bsLive & 1) - { - ++index6; - for (; bsLive < 1; bsLive += 8) - { - int num10 = this.input.ReadByte(); - if (num10 < 0) - throw new IOException("unexpected end of stream"); - num4 = num4 << 8 | num10; - } - --bsLive; - } - moveToFrontDecode0 = numArray3[num9 - numArray1[index6]]; - num7 <<= 1; - } - byte num11 = data.seqToUnseq[(int) moveToFrontDecodeYy[0]]; - data.unzftab[(int) num11 & (int) byte.MaxValue] += num6 + 1; - while (num6-- >= 0) - data.ll8[++index3] = num11; - if (index3 >= num1) - throw new IOException("block overrun"); - } - else - { - if (++index3 >= num1) - throw new IOException("block overrun"); - byte index7 = moveToFrontDecodeYy[moveToFrontDecode0 - 1]; - ++data.unzftab[(int) data.seqToUnseq[(int) index7] & (int) byte.MaxValue]; - data.ll8[index3] = data.seqToUnseq[(int) index7]; - if (moveToFrontDecode0 <= 16) - { - int index8 = moveToFrontDecode0 - 1; - while (index8 > 0) - moveToFrontDecodeYy[index8] = moveToFrontDecodeYy[--index8]; - } - else - Buffer.BlockCopy((Array) moveToFrontDecodeYy, 0, (Array) moveToFrontDecodeYy, 1, moveToFrontDecode0 - 1); - moveToFrontDecodeYy[0] = index7; - if (num2 == 0) - { - num2 = Ionic.BZip2.BZip2.G_SIZE - 1; - int index9 = (int) data.selector[++index2] & (int) byte.MaxValue; - numArray1 = data.gBase[index9]; - numArray2 = data.gLimit[index9]; - numArray3 = data.gPerm[index9]; - num5 = data.gMinlen[index9]; - } - else - --num2; - int index10; - for (index10 = num5; bsLive < index10; bsLive += 8) - { - int num12 = this.input.ReadByte(); - if (num12 < 0) - throw new IOException("unexpected end of stream"); - num4 = num4 << 8 | num12; - } - int num13 = num4 >> bsLive - index10 & (1 << index10) - 1; - bsLive -= index10; - for (; num13 > numArray2[index10]; num13 = num13 << 1 | num4 >> bsLive & 1) - { - ++index10; - for (; bsLive < 1; bsLive += 8) - { - int num14 = this.input.ReadByte(); - if (num14 < 0) - throw new IOException("unexpected end of stream"); - num4 = num4 << 8 | num14; - } - --bsLive; - } - moveToFrontDecode0 = numArray3[num13 - numArray1[index10]]; - } - } - this.last = index3; - this.bsLive = bsLive; - this.bsBuff = num4; - } - - private int getAndMoveToFrontDecode0(int groupNo) - { - BZip2InputStream.DecompressionState data = this.data; - int index = (int) data.selector[groupNo] & (int) byte.MaxValue; - int[] numArray = data.gLimit[index]; - int n = data.gMinlen[index]; - int num1 = this.GetBits(n); - int bsLive = this.bsLive; - int num2 = this.bsBuff; - for (; num1 > numArray[n]; num1 = num1 << 1 | num2 >> bsLive & 1) - { - ++n; - for (; bsLive < 1; bsLive += 8) - { - int num3 = this.input.ReadByte(); - if (num3 < 0) - throw new IOException("unexpected end of stream"); - num2 = num2 << 8 | num3; - } - --bsLive; - } - this.bsLive = bsLive; - this.bsBuff = num2; - return data.gPerm[index][num1 - data.gBase[index][n]]; - } - - private void SetupBlock() - { - if (this.data == null) - return; - BZip2InputStream.DecompressionState data = this.data; - int[] numArray = data.initTT(this.last + 1); - for (int index = 0; index <= (int) byte.MaxValue; ++index) - { - if (data.unzftab[index] < 0 || data.unzftab[index] > this.last) - throw new Exception("BZ_DATA_ERROR"); - } - data.cftab[0] = 0; - for (int index = 1; index <= 256; ++index) - data.cftab[index] = data.unzftab[index - 1]; - for (int index = 1; index <= 256; ++index) - data.cftab[index] += data.cftab[index - 1]; - for (int index = 0; index <= 256; ++index) - { - if (data.cftab[index] < 0 || data.cftab[index] > this.last + 1) - throw new Exception(string.Format("BZ_DATA_ERROR: cftab[{0}]={1} last={2}", (object) index, (object) data.cftab[index], (object) this.last)); - } - for (int index = 1; index <= 256; ++index) - { - if (data.cftab[index - 1] > data.cftab[index]) - throw new Exception("BZ_DATA_ERROR"); - } - int index1 = 0; - for (int last = this.last; index1 <= last; ++index1) - numArray[data.cftab[(int) data.ll8[index1] & (int) byte.MaxValue]++] = index1; - if (this.origPtr < 0 || this.origPtr >= numArray.Length) - throw new IOException("stream corrupted"); - this.su_tPos = numArray[this.origPtr]; - this.su_count = 0; - this.su_i2 = 0; - this.su_ch2 = 256; - if (this.blockRandomised) - { - this.su_rNToGo = 0; - this.su_rTPos = 0; - this.SetupRandPartA(); - } - else - this.SetupNoRandPartA(); - } - - private void SetupRandPartA() - { - if (this.su_i2 <= this.last) - { - this.su_chPrev = this.su_ch2; - int num1 = (int) this.data.ll8[this.su_tPos] & (int) byte.MaxValue; - this.su_tPos = this.data.tt[this.su_tPos]; - if (this.su_rNToGo == 0) - { - this.su_rNToGo = Rand.Rnums(this.su_rTPos) - 1; - if (++this.su_rTPos == 512) - this.su_rTPos = 0; - } - else - --this.su_rNToGo; - int num2 = num1; - int num3 = this.su_rNToGo == 1 ? 1 : 0; - int b; - this.su_ch2 = b = num2 ^ num3; - ++this.su_i2; - this.currentChar = b; - this.currentState = BZip2InputStream.CState.RAND_PART_B; - this.crc.UpdateCRC((byte) b); - } - else - { - this.EndBlock(); - this.InitBlock(); - this.SetupBlock(); - } - } - - private void SetupNoRandPartA() - { - if (this.su_i2 <= this.last) - { - this.su_chPrev = this.su_ch2; - int b = (int) this.data.ll8[this.su_tPos] & (int) byte.MaxValue; - this.su_ch2 = b; - this.su_tPos = this.data.tt[this.su_tPos]; - ++this.su_i2; - this.currentChar = b; - this.currentState = BZip2InputStream.CState.NO_RAND_PART_B; - this.crc.UpdateCRC((byte) b); - } - else - { - this.currentState = BZip2InputStream.CState.NO_RAND_PART_A; - this.EndBlock(); - this.InitBlock(); - this.SetupBlock(); - } - } - - private void SetupRandPartB() - { - if (this.su_ch2 != this.su_chPrev) - { - this.currentState = BZip2InputStream.CState.RAND_PART_A; - this.su_count = 1; - this.SetupRandPartA(); - } - else if (++this.su_count >= 4) - { - this.su_z = (char) ((uint) this.data.ll8[this.su_tPos] & (uint) byte.MaxValue); - this.su_tPos = this.data.tt[this.su_tPos]; - if (this.su_rNToGo == 0) - { - this.su_rNToGo = Rand.Rnums(this.su_rTPos) - 1; - if (++this.su_rTPos == 512) - this.su_rTPos = 0; - } - else - --this.su_rNToGo; - this.su_j2 = 0; - this.currentState = BZip2InputStream.CState.RAND_PART_C; - if (this.su_rNToGo == 1) - this.su_z ^= '\u0001'; - this.SetupRandPartC(); - } - else - { - this.currentState = BZip2InputStream.CState.RAND_PART_A; - this.SetupRandPartA(); - } - } - - private void SetupRandPartC() - { - if (this.su_j2 < (int) this.su_z) - { - this.currentChar = this.su_ch2; - this.crc.UpdateCRC((byte) this.su_ch2); - ++this.su_j2; - } - else - { - this.currentState = BZip2InputStream.CState.RAND_PART_A; - ++this.su_i2; - this.su_count = 0; - this.SetupRandPartA(); - } - } - - private void SetupNoRandPartB() - { - if (this.su_ch2 != this.su_chPrev) - { - this.su_count = 1; - this.SetupNoRandPartA(); - } - else if (++this.su_count >= 4) - { - this.su_z = (char) ((uint) this.data.ll8[this.su_tPos] & (uint) byte.MaxValue); - this.su_tPos = this.data.tt[this.su_tPos]; - this.su_j2 = 0; - this.SetupNoRandPartC(); - } - else - this.SetupNoRandPartA(); - } - - private void SetupNoRandPartC() - { - if (this.su_j2 < (int) this.su_z) - { - int suCh2 = this.su_ch2; - this.currentChar = suCh2; - this.crc.UpdateCRC((byte) suCh2); - ++this.su_j2; - this.currentState = BZip2InputStream.CState.NO_RAND_PART_C; - } - else - { - ++this.su_i2; - this.su_count = 0; - this.SetupNoRandPartA(); - } - } - - private enum CState - { - EOF, - START_BLOCK, - RAND_PART_A, - RAND_PART_B, - RAND_PART_C, - NO_RAND_PART_A, - NO_RAND_PART_B, - NO_RAND_PART_C, - } - - private sealed class DecompressionState - { - public readonly bool[] inUse = new bool[256]; - public readonly byte[] seqToUnseq = new byte[256]; - public readonly byte[] selector = new byte[Ionic.BZip2.BZip2.MaxSelectors]; - public readonly byte[] selectorMtf = new byte[Ionic.BZip2.BZip2.MaxSelectors]; - public readonly int[] unzftab; - public readonly int[][] gLimit; - public readonly int[][] gBase; - public readonly int[][] gPerm; - public readonly int[] gMinlen; - public readonly int[] cftab; - public readonly byte[] getAndMoveToFrontDecode_yy; - public readonly char[][] temp_charArray2d; - public readonly byte[] recvDecodingTables_pos; - public int[] tt; - public byte[] ll8; - - public DecompressionState(int blockSize100k) - { - this.unzftab = new int[256]; - this.gLimit = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - this.gBase = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - this.gPerm = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - this.gMinlen = new int[Ionic.BZip2.BZip2.NGroups]; - this.cftab = new int[257]; - this.getAndMoveToFrontDecode_yy = new byte[256]; - this.temp_charArray2d = Ionic.BZip2.BZip2.InitRectangularArray(Ionic.BZip2.BZip2.NGroups, Ionic.BZip2.BZip2.MaxAlphaSize); - this.recvDecodingTables_pos = new byte[Ionic.BZip2.BZip2.NGroups]; - this.ll8 = new byte[blockSize100k * Ionic.BZip2.BZip2.BlockSizeMultiple]; - } - - public int[] initTT(int length) - { - int[] numArray = this.tt; - if (numArray == null || numArray.Length < length) - this.tt = numArray = new int[length]; - return numArray; - } - } - } -} diff --git a/Src/IonicZipFiles/BZip2/BZip2OutputStream.cs b/Src/IonicZipFiles/BZip2/BZip2OutputStream.cs deleted file mode 100644 index d7c70d86..00000000 --- a/Src/IonicZipFiles/BZip2/BZip2OutputStream.cs +++ /dev/null @@ -1,189 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.BZip2.BZip2OutputStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Diagnostics; -using System.IO; -using System.Threading; - -namespace Ionic.BZip2 -{ - public class BZip2OutputStream : Stream - { - private int totalBytesWrittenIn; - private bool leaveOpen; - private BZip2Compressor compressor; - private uint combinedCRC; - private Stream output; - private BitWriter bw; - private int blockSize100k; - private BZip2OutputStream.TraceBits desiredTrace = BZip2OutputStream.TraceBits.Crc | BZip2OutputStream.TraceBits.Write; - - public BZip2OutputStream(Stream output) - : this(output, Ionic.BZip2.BZip2.MaxBlockSize, false) - { - } - - public BZip2OutputStream(Stream output, int blockSize) - : this(output, blockSize, false) - { - } - - public BZip2OutputStream(Stream output, bool leaveOpen) - : this(output, Ionic.BZip2.BZip2.MaxBlockSize, leaveOpen) - { - } - - public BZip2OutputStream(Stream output, int blockSize, bool leaveOpen) - { - if (blockSize < Ionic.BZip2.BZip2.MinBlockSize || blockSize > Ionic.BZip2.BZip2.MaxBlockSize) - throw new ArgumentException(string.Format("blockSize={0} is out of range; must be between {1} and {2}", (object) blockSize, (object) Ionic.BZip2.BZip2.MinBlockSize, (object) Ionic.BZip2.BZip2.MaxBlockSize), nameof (blockSize)); - this.output = output; - this.bw = this.output.CanWrite ? new BitWriter(this.output) : throw new ArgumentException("The stream is not writable.", nameof (output)); - this.blockSize100k = blockSize; - this.compressor = new BZip2Compressor(this.bw, blockSize); - this.leaveOpen = leaveOpen; - this.combinedCRC = 0U; - this.EmitHeader(); - } - - public override void Close() - { - if (this.output == null) - return; - Stream output = this.output; - this.Finish(); - if (this.leaveOpen) - return; - output.Close(); - } - - public override void Flush() - { - if (this.output == null) - return; - this.bw.Flush(); - this.output.Flush(); - } - - private void EmitHeader() - { - byte[] buffer = new byte[4] - { - (byte) 66, - (byte) 90, - (byte) 104, - (byte) (48 + this.blockSize100k) - }; - this.output.Write(buffer, 0, buffer.Length); - } - - private void EmitTrailer() - { - this.bw.WriteByte((byte) 23); - this.bw.WriteByte((byte) 114); - this.bw.WriteByte((byte) 69); - this.bw.WriteByte((byte) 56); - this.bw.WriteByte((byte) 80); - this.bw.WriteByte((byte) 144); - this.bw.WriteInt(this.combinedCRC); - this.bw.FinishAndPad(); - } - - private void Finish() - { - try - { - int totalBytesWrittenOut = this.bw.TotalBytesWrittenOut; - this.compressor.CompressAndWrite(); - this.combinedCRC = this.combinedCRC << 1 | this.combinedCRC >> 31; - this.combinedCRC ^= this.compressor.Crc32; - this.EmitTrailer(); - } - finally - { - this.output = (Stream) null; - this.compressor = (BZip2Compressor) null; - this.bw = (BitWriter) null; - } - } - - public int BlockSize => this.blockSize100k; - - public override void Write(byte[] buffer, int offset, int count) - { - if (offset < 0) - throw new IndexOutOfRangeException(string.Format("offset ({0}) must be > 0", (object) offset)); - if (count < 0) - throw new IndexOutOfRangeException(string.Format("count ({0}) must be > 0", (object) count)); - if (offset + count > buffer.Length) - throw new IndexOutOfRangeException(string.Format("offset({0}) count({1}) bLength({2})", (object) offset, (object) count, (object) buffer.Length)); - if (this.output == null) - throw new IOException("the stream is not open"); - if (count == 0) - return; - int num1 = 0; - int count1 = count; - do - { - int num2 = this.compressor.Fill(buffer, offset, count1); - if (num2 != count1) - { - int totalBytesWrittenOut = this.bw.TotalBytesWrittenOut; - this.compressor.CompressAndWrite(); - this.combinedCRC = this.combinedCRC << 1 | this.combinedCRC >> 31; - this.combinedCRC ^= this.compressor.Crc32; - offset += num2; - } - count1 -= num2; - num1 += num2; - } - while (count1 > 0); - this.totalBytesWrittenIn += num1; - } - - public override bool CanRead => false; - - public override bool CanSeek => false; - - public override bool CanWrite => this.output != null ? this.output.CanWrite : throw new ObjectDisposedException("BZip2Stream"); - - public override long Length => throw new NotImplementedException(); - - public override long Position - { - get => (long) this.totalBytesWrittenIn; - set => throw new NotImplementedException(); - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotImplementedException(); - - public override void SetLength(long value) => throw new NotImplementedException(); - - public override int Read(byte[] buffer, int offset, int count) => throw new NotImplementedException(); - - [Conditional("Trace")] - private void TraceOutput( - BZip2OutputStream.TraceBits bits, - string format, - params object[] varParams) - { - if ((bits & this.desiredTrace) == BZip2OutputStream.TraceBits.None) - return; - Console.Write("{0:000} PBOS ", (object) Thread.CurrentThread.GetHashCode()); - Console.WriteLine(format, varParams); - } - - [Flags] - private enum TraceBits : uint - { - None = 0, - Crc = 1, - Write = 2, - All = 4294967295, // 0xFFFFFFFF - } - } -} diff --git a/Src/IonicZipFiles/BZip2/BitWriter.cs b/Src/IonicZipFiles/BZip2/BitWriter.cs deleted file mode 100644 index 7456c165..00000000 --- a/Src/IonicZipFiles/BZip2/BitWriter.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.BZip2.BitWriter -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.IO; - -namespace Ionic.BZip2 -{ - internal class BitWriter - { - private uint accumulator; - private int nAccumulatedBits; - private Stream output; - private int totalBytesWrittenOut; - - public BitWriter(Stream s) => this.output = s; - - public byte RemainingBits => (byte) (this.accumulator >> 32 - this.nAccumulatedBits & (uint) byte.MaxValue); - - public int NumRemainingBits => this.nAccumulatedBits; - - public int TotalBytesWrittenOut => this.totalBytesWrittenOut; - - public void Reset() - { - this.accumulator = 0U; - this.nAccumulatedBits = 0; - this.totalBytesWrittenOut = 0; - this.output.Seek(0L, SeekOrigin.Begin); - this.output.SetLength(0L); - } - - public void WriteBits(int nbits, uint value) - { - int nAccumulatedBits = this.nAccumulatedBits; - uint accumulator = this.accumulator; - for (; nAccumulatedBits >= 8; nAccumulatedBits -= 8) - { - this.output.WriteByte((byte) (accumulator >> 24 & (uint) byte.MaxValue)); - ++this.totalBytesWrittenOut; - accumulator <<= 8; - } - this.accumulator = accumulator | value << 32 - nAccumulatedBits - nbits; - this.nAccumulatedBits = nAccumulatedBits + nbits; - } - - public void WriteByte(byte b) => this.WriteBits(8, (uint) b); - - public void WriteInt(uint u) - { - this.WriteBits(8, u >> 24 & (uint) byte.MaxValue); - this.WriteBits(8, u >> 16 & (uint) byte.MaxValue); - this.WriteBits(8, u >> 8 & (uint) byte.MaxValue); - this.WriteBits(8, u & (uint) byte.MaxValue); - } - - public void Flush() => this.WriteBits(0, 0U); - - public void FinishAndPad() - { - this.Flush(); - if (this.NumRemainingBits <= 0) - return; - this.output.WriteByte((byte) (this.accumulator >> 24 & (uint) byte.MaxValue)); - ++this.totalBytesWrittenOut; - } - } -} diff --git a/Src/IonicZipFiles/BZip2/Rand.cs b/Src/IonicZipFiles/BZip2/Rand.cs deleted file mode 100644 index cb2e8afb..00000000 --- a/Src/IonicZipFiles/BZip2/Rand.cs +++ /dev/null @@ -1,529 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.BZip2.Rand -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.BZip2 -{ - internal static class Rand - { - private static int[] RNUMS = new int[512] - { - 619, - 720, - (int) sbyte.MaxValue, - 481, - 931, - 816, - 813, - 233, - 566, - 247, - 985, - 724, - 205, - 454, - 863, - 491, - 741, - 242, - 949, - 214, - 733, - 859, - 335, - 708, - 621, - 574, - 73, - 654, - 730, - 472, - 419, - 436, - 278, - 496, - 867, - 210, - 399, - 680, - 480, - 51, - 878, - 465, - 811, - 169, - 869, - 675, - 611, - 697, - 867, - 561, - 862, - 687, - 507, - 283, - 482, - 129, - 807, - 591, - 733, - 623, - 150, - 238, - 59, - 379, - 684, - 877, - 625, - 169, - 643, - 105, - 170, - 607, - 520, - 932, - 727, - 476, - 693, - 425, - 174, - 647, - 73, - 122, - 335, - 530, - 442, - 853, - 695, - 249, - 445, - 515, - 909, - 545, - 703, - 919, - 874, - 474, - 882, - 500, - 594, - 612, - 641, - 801, - 220, - 162, - 819, - 984, - 589, - 513, - 495, - 799, - 161, - 604, - 958, - 533, - 221, - 400, - 386, - 867, - 600, - 782, - 382, - 596, - 414, - 171, - 516, - 375, - 682, - 485, - 911, - 276, - 98, - 553, - 163, - 354, - 666, - 933, - 424, - 341, - 533, - 870, - 227, - 730, - 475, - 186, - 263, - 647, - 537, - 686, - 600, - 224, - 469, - 68, - 770, - 919, - 190, - 373, - 294, - 822, - 808, - 206, - 184, - 943, - 795, - 384, - 383, - 461, - 404, - 758, - 839, - 887, - 715, - 67, - 618, - 276, - 204, - 918, - 873, - 777, - 604, - 560, - 951, - 160, - 578, - 722, - 79, - 804, - 96, - 409, - 713, - 940, - 652, - 934, - 970, - 447, - 318, - 353, - 859, - 672, - 112, - 785, - 645, - 863, - 803, - 350, - 139, - 93, - 354, - 99, - 820, - 908, - 609, - 772, - 154, - 274, - 580, - 184, - 79, - 626, - 630, - 742, - 653, - 282, - 762, - 623, - 680, - 81, - 927, - 626, - 789, - 125, - 411, - 521, - 938, - 300, - 821, - 78, - 343, - 175, - 128, - 250, - 170, - 774, - 972, - 275, - 999, - 639, - 495, - 78, - 352, - 126, - 857, - 956, - 358, - 619, - 580, - 124, - 737, - 594, - 701, - 612, - 669, - 112, - 134, - 694, - 363, - 992, - 809, - 743, - 168, - 974, - 944, - 375, - 748, - 52, - 600, - 747, - 642, - 182, - 862, - 81, - 344, - 805, - 988, - 739, - 511, - 655, - 814, - 334, - 249, - 515, - 897, - 955, - 664, - 981, - 649, - 113, - 974, - 459, - 893, - 228, - 433, - 837, - 553, - 268, - 926, - 240, - 102, - 654, - 459, - 51, - 686, - 754, - 806, - 760, - 493, - 403, - 415, - 394, - 687, - 700, - 946, - 670, - 656, - 610, - 738, - 392, - 760, - 799, - 887, - 653, - 978, - 321, - 576, - 617, - 626, - 502, - 894, - 679, - 243, - 440, - 680, - 879, - 194, - 572, - 640, - 724, - 926, - 56, - 204, - 700, - 707, - 151, - 457, - 449, - 797, - 195, - 791, - 558, - 945, - 679, - 297, - 59, - 87, - 824, - 713, - 663, - 412, - 693, - 342, - 606, - 134, - 108, - 571, - 364, - 631, - 212, - 174, - 643, - 304, - 329, - 343, - 97, - 430, - 751, - 497, - 314, - 983, - 374, - 822, - 928, - 140, - 206, - 73, - 263, - 980, - 736, - 876, - 478, - 430, - 305, - 170, - 514, - 364, - 692, - 829, - 82, - 855, - 953, - 676, - 246, - 369, - 970, - 294, - 750, - 807, - 827, - 150, - 790, - 288, - 923, - 804, - 378, - 215, - 828, - 592, - 281, - 565, - 555, - 710, - 82, - 896, - 831, - 547, - 261, - 524, - 462, - 293, - 465, - 502, - 56, - 661, - 821, - 976, - 991, - 658, - 869, - 905, - 758, - 745, - 193, - 768, - 550, - 608, - 933, - 378, - 286, - 215, - 979, - 792, - 961, - 61, - 688, - 793, - 644, - 986, - 403, - 106, - 366, - 905, - 644, - 372, - 567, - 466, - 434, - 645, - 210, - 389, - 550, - 919, - 135, - 780, - 773, - 635, - 389, - 707, - 100, - 626, - 958, - 165, - 504, - 920, - 176, - 193, - 713, - 857, - 265, - 203, - 50, - 668, - 108, - 645, - 990, - 626, - 197, - 510, - 357, - 358, - 850, - 858, - 364, - 936, - 638 - }; - - internal static int Rnums(int i) => Rand.RNUMS[i]; - } -} diff --git a/Src/IonicZipFiles/CF.csproj b/Src/IonicZipFiles/CF.csproj deleted file mode 100644 index 896c87ad..00000000 --- a/Src/IonicZipFiles/CF.csproj +++ /dev/null @@ -1,116 +0,0 @@ - - - - - Debug - AnyCPU - {8EAB67AF-C96D-402C-B44D-A96BA5AE04B2} - Library - Ionic.Zip.CF - 1.9.1.8 - Ionic - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Src/IonicZipFiles/CF.sln b/Src/IonicZipFiles/CF.sln deleted file mode 100644 index eceddf91..00000000 --- a/Src/IonicZipFiles/CF.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ionic.Zip.CF", "CF.csproj", "{8EAB67AF-C96D-402C-B44D-A96BA5AE04B2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8EAB67AF-C96D-402C-B44D-A96BA5AE04B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8EAB67AF-C96D-402C-B44D-A96BA5AE04B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8EAB67AF-C96D-402C-B44D-A96BA5AE04B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8EAB67AF-C96D-402C-B44D-A96BA5AE04B2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Src/IonicZipFiles/Crc/CRC32.cs b/Src/IonicZipFiles/Crc/CRC32.cs deleted file mode 100644 index a750e427..00000000 --- a/Src/IonicZipFiles/Crc/CRC32.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Crc.CRC32 -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace Ionic.Crc -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d0000C")] - [ComVisible(true)] - public class CRC32 - { - private const int BUFFER_SIZE = 8192; - private uint dwPolynomial; - private long _TotalBytesRead; - private bool reverseBits; - private uint[] crc32Table; - private uint _register = uint.MaxValue; - - public long TotalBytesRead => this._TotalBytesRead; - - public int Crc32Result => ~(int) this._register; - - public int GetCrc32(Stream input) => this.GetCrc32AndCopy(input, (Stream) null); - - public int GetCrc32AndCopy(Stream input, Stream output) - { - if (input == null) - throw new Exception("The input stream must not be null."); - byte[] numArray = new byte[8192]; - int count1 = 8192; - this._TotalBytesRead = 0L; - int count2 = input.Read(numArray, 0, count1); - output?.Write(numArray, 0, count2); - this._TotalBytesRead += (long) count2; - while (count2 > 0) - { - this.SlurpBlock(numArray, 0, count2); - count2 = input.Read(numArray, 0, count1); - output?.Write(numArray, 0, count2); - this._TotalBytesRead += (long) count2; - } - return ~(int) this._register; - } - - public int ComputeCrc32(int W, byte B) => this._InternalComputeCrc32((uint) W, B); - - internal int _InternalComputeCrc32(uint W, byte B) => (int) this.crc32Table[(IntPtr) (uint) (((int) W ^ (int) B) & (int) byte.MaxValue)] ^ (int) (W >> 8); - - public void SlurpBlock(byte[] block, int offset, int count) - { - if (block == null) - throw new Exception("The data buffer must not be null."); - for (int index1 = 0; index1 < count; ++index1) - { - int index2 = offset + index1; - byte num = block[index2]; - this._register = !this.reverseBits ? this._register >> 8 ^ this.crc32Table[(IntPtr) (this._register & (uint) byte.MaxValue ^ (uint) num)] : this._register << 8 ^ this.crc32Table[(IntPtr) (this._register >> 24 ^ (uint) num)]; - } - this._TotalBytesRead += (long) count; - } - - public void UpdateCRC(byte b) - { - if (this.reverseBits) - this._register = this._register << 8 ^ this.crc32Table[(IntPtr) (this._register >> 24 ^ (uint) b)]; - else - this._register = this._register >> 8 ^ this.crc32Table[(IntPtr) (this._register & (uint) byte.MaxValue ^ (uint) b)]; - } - - public void UpdateCRC(byte b, int n) - { - while (n-- > 0) - { - if (this.reverseBits) - { - uint num = this._register >> 24 ^ (uint) b; - this._register = this._register << 8 ^ this.crc32Table[num >= 0U ? (IntPtr) num : (IntPtr) (num + 256U)]; - } - else - { - uint num = this._register & (uint) byte.MaxValue ^ (uint) b; - this._register = this._register >> 8 ^ this.crc32Table[num >= 0U ? (IntPtr) num : (IntPtr) (num + 256U)]; - } - } - } - - private static uint ReverseBits(uint data) - { - uint num1 = data; - uint num2 = (uint) (((int) num1 & 1431655765) << 1 | (int) (num1 >> 1) & 1431655765); - uint num3 = (uint) (((int) num2 & 858993459) << 2 | (int) (num2 >> 2) & 858993459); - uint num4 = (uint) (((int) num3 & 252645135) << 4 | (int) (num3 >> 4) & 252645135); - return (uint) ((int) num4 << 24 | ((int) num4 & 65280) << 8 | (int) (num4 >> 8) & 65280) | num4 >> 24; - } - - private static byte ReverseBits(byte data) - { - uint num1 = (uint) data * 131586U; - uint num2 = 17055760; - return (byte) (16781313 * ((int) (num1 & num2) + ((int) num1 << 2 & (int) num2 << 1)) >>> 24); - } - - private void GenerateLookupTable() - { - this.crc32Table = new uint[256]; - byte data1 = 0; - do - { - uint data2 = (uint) data1; - for (byte index = 8; index > (byte) 0; --index) - { - if (((int) data2 & 1) == 1) - data2 = data2 >> 1 ^ this.dwPolynomial; - else - data2 >>= 1; - } - if (this.reverseBits) - this.crc32Table[(int) CRC32.ReverseBits(data1)] = CRC32.ReverseBits(data2); - else - this.crc32Table[(int) data1] = data2; - ++data1; - } - while (data1 != (byte) 0); - } - - private uint gf2_matrix_times(uint[] matrix, uint vec) - { - uint num = 0; - int index = 0; - while (vec != 0U) - { - if (((int) vec & 1) == 1) - num ^= matrix[index]; - vec >>= 1; - ++index; - } - return num; - } - - private void gf2_matrix_square(uint[] square, uint[] mat) - { - for (int index = 0; index < 32; ++index) - square[index] = this.gf2_matrix_times(mat, mat[index]); - } - - public void Combine(int crc, int length) - { - uint[] numArray1 = new uint[32]; - uint[] numArray2 = new uint[32]; - if (length == 0) - return; - uint vec = ~this._register; - uint num1 = (uint) crc; - numArray2[0] = this.dwPolynomial; - uint num2 = 1; - for (int index = 1; index < 32; ++index) - { - numArray2[index] = num2; - num2 <<= 1; - } - this.gf2_matrix_square(numArray1, numArray2); - this.gf2_matrix_square(numArray2, numArray1); - uint num3 = (uint) length; - do - { - this.gf2_matrix_square(numArray1, numArray2); - if (((int) num3 & 1) == 1) - vec = this.gf2_matrix_times(numArray1, vec); - uint num4 = num3 >> 1; - if (num4 != 0U) - { - this.gf2_matrix_square(numArray2, numArray1); - if (((int) num4 & 1) == 1) - vec = this.gf2_matrix_times(numArray2, vec); - num3 = num4 >> 1; - } - else - break; - } - while (num3 != 0U); - this._register = ~(vec ^ num1); - } - - public CRC32() - : this(false) - { - } - - public CRC32(bool reverseBits) - : this(-306674912, reverseBits) - { - } - - public CRC32(int polynomial, bool reverseBits) - { - this.reverseBits = reverseBits; - this.dwPolynomial = (uint) polynomial; - this.GenerateLookupTable(); - } - - public void Reset() => this._register = uint.MaxValue; - } -} diff --git a/Src/IonicZipFiles/Crc/CrcCalculatorStream.cs b/Src/IonicZipFiles/Crc/CrcCalculatorStream.cs deleted file mode 100644 index b0c3469c..00000000 --- a/Src/IonicZipFiles/Crc/CrcCalculatorStream.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Crc.CrcCalculatorStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Crc -{ - public class CrcCalculatorStream : Stream, IDisposable - { - private static readonly long UnsetLengthLimit = -99; - internal Stream _innerStream; - private CRC32 _Crc32; - private long _lengthLimit = -99; - private bool _leaveOpen; - - public CrcCalculatorStream(Stream stream) - : this(true, CrcCalculatorStream.UnsetLengthLimit, stream, (CRC32) null) - { - } - - public CrcCalculatorStream(Stream stream, bool leaveOpen) - : this(leaveOpen, CrcCalculatorStream.UnsetLengthLimit, stream, (CRC32) null) - { - } - - public CrcCalculatorStream(Stream stream, long length) - : this(true, length, stream, (CRC32) null) - { - if (length < 0L) - throw new ArgumentException(nameof (length)); - } - - public CrcCalculatorStream(Stream stream, long length, bool leaveOpen) - : this(leaveOpen, length, stream, (CRC32) null) - { - if (length < 0L) - throw new ArgumentException(nameof (length)); - } - - public CrcCalculatorStream(Stream stream, long length, bool leaveOpen, CRC32 crc32) - : this(leaveOpen, length, stream, crc32) - { - if (length < 0L) - throw new ArgumentException(nameof (length)); - } - - private CrcCalculatorStream(bool leaveOpen, long length, Stream stream, CRC32 crc32) - { - this._innerStream = stream; - this._Crc32 = crc32 ?? new CRC32(); - this._lengthLimit = length; - this._leaveOpen = leaveOpen; - } - - public long TotalBytesSlurped => this._Crc32.TotalBytesRead; - - public int Crc => this._Crc32.Crc32Result; - - public bool LeaveOpen - { - get => this._leaveOpen; - set => this._leaveOpen = value; - } - - public override int Read(byte[] buffer, int offset, int count) - { - int count1 = count; - if (this._lengthLimit != CrcCalculatorStream.UnsetLengthLimit) - { - if (this._Crc32.TotalBytesRead >= this._lengthLimit) - return 0; - long num = this._lengthLimit - this._Crc32.TotalBytesRead; - if (num < (long) count) - count1 = (int) num; - } - int count2 = this._innerStream.Read(buffer, offset, count1); - if (count2 > 0) - this._Crc32.SlurpBlock(buffer, offset, count2); - return count2; - } - - public override void Write(byte[] buffer, int offset, int count) - { - if (count > 0) - this._Crc32.SlurpBlock(buffer, offset, count); - this._innerStream.Write(buffer, offset, count); - } - - public override bool CanRead => this._innerStream.CanRead; - - public override bool CanSeek => false; - - public override bool CanWrite => this._innerStream.CanWrite; - - public override void Flush() => this._innerStream.Flush(); - - public override long Length => this._lengthLimit == CrcCalculatorStream.UnsetLengthLimit ? this._innerStream.Length : this._lengthLimit; - - public override long Position - { - get => this._Crc32.TotalBytesRead; - set => throw new NotSupportedException(); - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); - - public override void SetLength(long value) => throw new NotSupportedException(); - - void IDisposable.Dispose() => this.Close(); - - public override void Close() - { - base.Close(); - if (this._leaveOpen) - return; - this._innerStream.Close(); - } - } -} diff --git a/Src/IonicZipFiles/Zip/AddOrUpdateAction.cs b/Src/IonicZipFiles/Zip/AddOrUpdateAction.cs deleted file mode 100644 index e84ddb9a..00000000 --- a/Src/IonicZipFiles/Zip/AddOrUpdateAction.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.AddOrUpdateAction -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - internal enum AddOrUpdateAction - { - AddOnly, - AddOrUpdate, - } -} diff --git a/Src/IonicZipFiles/Zip/AddProgressEventArgs.cs b/Src/IonicZipFiles/Zip/AddProgressEventArgs.cs deleted file mode 100644 index ed35c215..00000000 --- a/Src/IonicZipFiles/Zip/AddProgressEventArgs.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.AddProgressEventArgs -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public class AddProgressEventArgs : ZipProgressEventArgs - { - internal AddProgressEventArgs() - { - } - - private AddProgressEventArgs(string archiveName, ZipProgressEventType flavor) - : base(archiveName, flavor) - { - } - - internal static AddProgressEventArgs AfterEntry( - string archiveName, - ZipEntry entry, - int entriesTotal) - { - AddProgressEventArgs progressEventArgs = new AddProgressEventArgs(archiveName, ZipProgressEventType.Adding_AfterAddEntry); - progressEventArgs.EntriesTotal = entriesTotal; - progressEventArgs.CurrentEntry = entry; - return progressEventArgs; - } - - internal static AddProgressEventArgs Started(string archiveName) => new AddProgressEventArgs(archiveName, ZipProgressEventType.Adding_Started); - - internal static AddProgressEventArgs Completed(string archiveName) => new AddProgressEventArgs(archiveName, ZipProgressEventType.Adding_Completed); - } -} diff --git a/Src/IonicZipFiles/Zip/BadCrcException.cs b/Src/IonicZipFiles/Zip/BadCrcException.cs deleted file mode 100644 index 841a9ba5..00000000 --- a/Src/IonicZipFiles/Zip/BadCrcException.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.BadCrcException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d00009")] - [Serializable] - public class BadCrcException : ZipException - { - public BadCrcException() - { - } - - public BadCrcException(string message) - : base(message) - { - } - } -} diff --git a/Src/IonicZipFiles/Zip/BadPasswordException.cs b/Src/IonicZipFiles/Zip/BadPasswordException.cs deleted file mode 100644 index 5ba86add..00000000 --- a/Src/IonicZipFiles/Zip/BadPasswordException.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.BadPasswordException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d0000B")] - [Serializable] - public class BadPasswordException : ZipException - { - public BadPasswordException() - { - } - - public BadPasswordException(string message) - : base(message) - { - } - - public BadPasswordException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/Src/IonicZipFiles/Zip/BadReadException.cs b/Src/IonicZipFiles/Zip/BadReadException.cs deleted file mode 100644 index 7e9ba212..00000000 --- a/Src/IonicZipFiles/Zip/BadReadException.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.BadReadException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d0000A")] - [Serializable] - public class BadReadException : ZipException - { - public BadReadException() - { - } - - public BadReadException(string message) - : base(message) - { - } - - public BadReadException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/Src/IonicZipFiles/Zip/BadStateException.cs b/Src/IonicZipFiles/Zip/BadStateException.cs deleted file mode 100644 index a0ec19f7..00000000 --- a/Src/IonicZipFiles/Zip/BadStateException.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.BadStateException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d00007")] - [Serializable] - public class BadStateException : ZipException - { - public BadStateException() - { - } - - public BadStateException(string message) - : base(message) - { - } - - public BadStateException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/Src/IonicZipFiles/Zip/CloseDelegate.cs b/Src/IonicZipFiles/Zip/CloseDelegate.cs deleted file mode 100644 index 9f700fdd..00000000 --- a/Src/IonicZipFiles/Zip/CloseDelegate.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.CloseDelegate -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.IO; - -namespace Ionic.Zip -{ - public delegate void CloseDelegate(string entryName, Stream stream); -} diff --git a/Src/IonicZipFiles/Zip/ComHelper.cs b/Src/IonicZipFiles/Zip/ComHelper.cs deleted file mode 100644 index 9270515d..00000000 --- a/Src/IonicZipFiles/Zip/ComHelper.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ComHelper -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d0000F")] - [ComVisible(true)] - public class ComHelper - { - public bool IsZipFile(string filename) => ZipFile.IsZipFile(filename); - - public bool IsZipFileWithExtract(string filename) => ZipFile.IsZipFile(filename, true); - - public string GetZipLibraryVersion() => ZipFile.LibraryVersion.ToString(); - } -} diff --git a/Src/IonicZipFiles/Zip/CompressionMethod.cs b/Src/IonicZipFiles/Zip/CompressionMethod.cs deleted file mode 100644 index 0a7011b7..00000000 --- a/Src/IonicZipFiles/Zip/CompressionMethod.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.CompressionMethod -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum CompressionMethod - { - None = 0, - Deflate = 8, - BZip2 = 12, // 0x0000000C - } -} diff --git a/Src/IonicZipFiles/Zip/CountingStream.cs b/Src/IonicZipFiles/Zip/CountingStream.cs deleted file mode 100644 index 6e6fd810..00000000 --- a/Src/IonicZipFiles/Zip/CountingStream.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.CountingStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Zip -{ - public class CountingStream : Stream - { - private Stream _s; - private long _bytesWritten; - private long _bytesRead; - private long _initialOffset; - - public CountingStream(Stream stream) - { - this._s = stream; - try - { - this._initialOffset = this._s.Position; - } - catch - { - this._initialOffset = 0L; - } - } - - public Stream WrappedStream => this._s; - - public long BytesWritten => this._bytesWritten; - - public long BytesRead => this._bytesRead; - - public void Adjust(long delta) - { - this._bytesWritten -= delta; - if (this._bytesWritten < 0L) - throw new InvalidOperationException(); - if (!(this._s is CountingStream)) - return; - ((CountingStream) this._s).Adjust(delta); - } - - public override int Read(byte[] buffer, int offset, int count) - { - int num = this._s.Read(buffer, offset, count); - this._bytesRead += (long) num; - return num; - } - - public override void Write(byte[] buffer, int offset, int count) - { - if (count == 0) - return; - this._s.Write(buffer, offset, count); - this._bytesWritten += (long) count; - } - - public override bool CanRead => this._s.CanRead; - - public override bool CanSeek => this._s.CanSeek; - - public override bool CanWrite => this._s.CanWrite; - - public override void Flush() => this._s.Flush(); - - public override long Length => this._s.Length; - - public long ComputedPosition => this._initialOffset + this._bytesWritten; - - public override long Position - { - get => this._s.Position; - set - { - this._s.Seek(value, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this._s); - } - } - - public override long Seek(long offset, SeekOrigin origin) => this._s.Seek(offset, origin); - - public override void SetLength(long value) => this._s.SetLength(value); - } -} diff --git a/Src/IonicZipFiles/Zip/CryptoMode.cs b/Src/IonicZipFiles/Zip/CryptoMode.cs deleted file mode 100644 index 1a1b7026..00000000 --- a/Src/IonicZipFiles/Zip/CryptoMode.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.CryptoMode -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - internal enum CryptoMode - { - Encrypt, - Decrypt, - } -} diff --git a/Src/IonicZipFiles/Zip/EncryptionAlgorithm.cs b/Src/IonicZipFiles/Zip/EncryptionAlgorithm.cs deleted file mode 100644 index 875b9d35..00000000 --- a/Src/IonicZipFiles/Zip/EncryptionAlgorithm.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.EncryptionAlgorithm -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum EncryptionAlgorithm - { - None = 0, - PkzipWeak = 1, - Unsupported = 4, - } -} diff --git a/Src/IonicZipFiles/Zip/ExtractExistingFileAction.cs b/Src/IonicZipFiles/Zip/ExtractExistingFileAction.cs deleted file mode 100644 index c8553ea5..00000000 --- a/Src/IonicZipFiles/Zip/ExtractExistingFileAction.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ExtractExistingFileAction -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum ExtractExistingFileAction - { - Throw, - OverwriteSilently, - DoNotOverwrite, - InvokeExtractProgressEvent, - } -} diff --git a/Src/IonicZipFiles/Zip/ExtractProgressEventArgs.cs b/Src/IonicZipFiles/Zip/ExtractProgressEventArgs.cs deleted file mode 100644 index 0708fdde..00000000 --- a/Src/IonicZipFiles/Zip/ExtractProgressEventArgs.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ExtractProgressEventArgs -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public class ExtractProgressEventArgs : ZipProgressEventArgs - { - private int _entriesExtracted; - private string _target; - - internal ExtractProgressEventArgs( - string archiveName, - bool before, - int entriesTotal, - int entriesExtracted, - ZipEntry entry, - string extractLocation) - : base(archiveName, before ? ZipProgressEventType.Extracting_BeforeExtractEntry : ZipProgressEventType.Extracting_AfterExtractEntry) - { - this.EntriesTotal = entriesTotal; - this.CurrentEntry = entry; - this._entriesExtracted = entriesExtracted; - this._target = extractLocation; - } - - internal ExtractProgressEventArgs(string archiveName, ZipProgressEventType flavor) - : base(archiveName, flavor) - { - } - - internal ExtractProgressEventArgs() - { - } - - internal static ExtractProgressEventArgs BeforeExtractEntry( - string archiveName, - ZipEntry entry, - string extractLocation) - { - ExtractProgressEventArgs entry1 = new ExtractProgressEventArgs(); - entry1.ArchiveName = archiveName; - entry1.EventType = ZipProgressEventType.Extracting_BeforeExtractEntry; - entry1.CurrentEntry = entry; - entry1._target = extractLocation; - return entry1; - } - - internal static ExtractProgressEventArgs ExtractExisting( - string archiveName, - ZipEntry entry, - string extractLocation) - { - ExtractProgressEventArgs existing = new ExtractProgressEventArgs(); - existing.ArchiveName = archiveName; - existing.EventType = ZipProgressEventType.Extracting_ExtractEntryWouldOverwrite; - existing.CurrentEntry = entry; - existing._target = extractLocation; - return existing; - } - - internal static ExtractProgressEventArgs AfterExtractEntry( - string archiveName, - ZipEntry entry, - string extractLocation) - { - ExtractProgressEventArgs entry1 = new ExtractProgressEventArgs(); - entry1.ArchiveName = archiveName; - entry1.EventType = ZipProgressEventType.Extracting_AfterExtractEntry; - entry1.CurrentEntry = entry; - entry1._target = extractLocation; - return entry1; - } - - internal static ExtractProgressEventArgs ExtractAllStarted( - string archiveName, - string extractLocation) - { - return new ExtractProgressEventArgs(archiveName, ZipProgressEventType.Extracting_BeforeExtractAll) - { - _target = extractLocation - }; - } - - internal static ExtractProgressEventArgs ExtractAllCompleted( - string archiveName, - string extractLocation) - { - return new ExtractProgressEventArgs(archiveName, ZipProgressEventType.Extracting_AfterExtractAll) - { - _target = extractLocation - }; - } - - internal static ExtractProgressEventArgs ByteUpdate( - string archiveName, - ZipEntry entry, - long bytesWritten, - long totalBytes) - { - ExtractProgressEventArgs progressEventArgs = new ExtractProgressEventArgs(archiveName, ZipProgressEventType.Extracting_EntryBytesWritten); - progressEventArgs.ArchiveName = archiveName; - progressEventArgs.CurrentEntry = entry; - progressEventArgs.BytesTransferred = bytesWritten; - progressEventArgs.TotalBytesToTransfer = totalBytes; - return progressEventArgs; - } - - public int EntriesExtracted => this._entriesExtracted; - - public string ExtractLocation => this._target; - } -} diff --git a/Src/IonicZipFiles/Zip/NetCfFile.cs b/Src/IonicZipFiles/Zip/NetCfFile.cs deleted file mode 100644 index 1ccf2aaa..00000000 --- a/Src/IonicZipFiles/Zip/NetCfFile.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.NetCfFile -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - internal class NetCfFile - { - public static int SetTimes(string filename, DateTime ctime, DateTime atime, DateTime mtime) - { - IntPtr fileCe = (IntPtr) NetCfFile.CreateFileCE(filename, 1073741824U, 2U, 0, 3U, 0U, 0); - if ((int) fileCe == -1) - return Marshal.GetLastWin32Error(); - NetCfFile.SetFileTime(fileCe, BitConverter.GetBytes(ctime.ToFileTime()), BitConverter.GetBytes(atime.ToFileTime()), BitConverter.GetBytes(mtime.ToFileTime())); - NetCfFile.CloseHandle(fileCe); - return 0; - } - - public static int SetLastWriteTime(string filename, DateTime mtime) - { - IntPtr fileCe = (IntPtr) NetCfFile.CreateFileCE(filename, 1073741824U, 2U, 0, 3U, 0U, 0); - if ((int) fileCe == -1) - return Marshal.GetLastWin32Error(); - NetCfFile.SetFileTime(fileCe, (byte[]) null, (byte[]) null, BitConverter.GetBytes(mtime.ToFileTime())); - NetCfFile.CloseHandle(fileCe); - return 0; - } - - [DllImport("coredll.dll", EntryPoint = "CreateFile", SetLastError = true)] - internal static extern int CreateFileCE( - string lpFileName, - uint dwDesiredAccess, - uint dwShareMode, - int lpSecurityAttributes, - uint dwCreationDisposition, - uint dwFlagsAndAttributes, - int hTemplateFile); - - [DllImport("coredll", EntryPoint = "GetFileAttributes", SetLastError = true)] - internal static extern uint GetAttributes(string lpFileName); - - [DllImport("coredll", EntryPoint = "SetFileAttributes", SetLastError = true)] - internal static extern bool SetAttributes(string lpFileName, uint dwFileAttributes); - - [DllImport("coredll", SetLastError = true)] - internal static extern bool SetFileTime( - IntPtr hFile, - byte[] lpCreationTime, - byte[] lpLastAccessTime, - byte[] lpLastWriteTime); - - [DllImport("coredll.dll", SetLastError = true)] - internal static extern bool CloseHandle(IntPtr hObject); - } -} diff --git a/Src/IonicZipFiles/Zip/OffsetStream.cs b/Src/IonicZipFiles/Zip/OffsetStream.cs deleted file mode 100644 index bd9b1445..00000000 --- a/Src/IonicZipFiles/Zip/OffsetStream.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.OffsetStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Zip -{ - internal class OffsetStream : Stream, IDisposable - { - private long _originalPosition; - private Stream _innerStream; - - public OffsetStream(Stream s) - { - this._originalPosition = s.Position; - this._innerStream = s; - } - - public override int Read(byte[] buffer, int offset, int count) => this._innerStream.Read(buffer, offset, count); - - public override void Write(byte[] buffer, int offset, int count) => throw new NotImplementedException(); - - public override bool CanRead => this._innerStream.CanRead; - - public override bool CanSeek => this._innerStream.CanSeek; - - public override bool CanWrite => false; - - public override void Flush() => this._innerStream.Flush(); - - public override long Length => this._innerStream.Length; - - public override long Position - { - get => this._innerStream.Position - this._originalPosition; - set => this._innerStream.Position = this._originalPosition + value; - } - - public override long Seek(long offset, SeekOrigin origin) => this._innerStream.Seek(this._originalPosition + offset, origin) - this._originalPosition; - - public override void SetLength(long value) => throw new NotImplementedException(); - - void IDisposable.Dispose() => this.Close(); - - public override void Close() => base.Close(); - } -} diff --git a/Src/IonicZipFiles/Zip/OpenDelegate.cs b/Src/IonicZipFiles/Zip/OpenDelegate.cs deleted file mode 100644 index 4c7e5175..00000000 --- a/Src/IonicZipFiles/Zip/OpenDelegate.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.OpenDelegate -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.IO; - -namespace Ionic.Zip -{ - public delegate Stream OpenDelegate(string entryName); -} diff --git a/Src/IonicZipFiles/Zip/ReadOptions.cs b/Src/IonicZipFiles/Zip/ReadOptions.cs deleted file mode 100644 index 1e4cd720..00000000 --- a/Src/IonicZipFiles/Zip/ReadOptions.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ReadOptions -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; -using System.Text; - -namespace Ionic.Zip -{ - public class ReadOptions - { - private EventHandler \u003CReadProgress\u003Ek__BackingField; - private TextWriter \u003CStatusMessageWriter\u003Ek__BackingField; - private Encoding \u003CEncoding\u003Ek__BackingField; - - public EventHandler ReadProgress - { - get => this.\u003CReadProgress\u003Ek__BackingField; - set => this.\u003CReadProgress\u003Ek__BackingField = value; - } - - public TextWriter StatusMessageWriter - { - get => this.\u003CStatusMessageWriter\u003Ek__BackingField; - set => this.\u003CStatusMessageWriter\u003Ek__BackingField = value; - } - - public Encoding Encoding - { - get => this.\u003CEncoding\u003Ek__BackingField; - set => this.\u003CEncoding\u003Ek__BackingField = value; - } - } -} diff --git a/Src/IonicZipFiles/Zip/ReadProgressEventArgs.cs b/Src/IonicZipFiles/Zip/ReadProgressEventArgs.cs deleted file mode 100644 index ceed7fa5..00000000 --- a/Src/IonicZipFiles/Zip/ReadProgressEventArgs.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ReadProgressEventArgs -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public class ReadProgressEventArgs : ZipProgressEventArgs - { - internal ReadProgressEventArgs() - { - } - - private ReadProgressEventArgs(string archiveName, ZipProgressEventType flavor) - : base(archiveName, flavor) - { - } - - internal static ReadProgressEventArgs Before(string archiveName, int entriesTotal) - { - ReadProgressEventArgs progressEventArgs = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_BeforeReadEntry); - progressEventArgs.EntriesTotal = entriesTotal; - return progressEventArgs; - } - - internal static ReadProgressEventArgs After( - string archiveName, - ZipEntry entry, - int entriesTotal) - { - ReadProgressEventArgs progressEventArgs = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_AfterReadEntry); - progressEventArgs.EntriesTotal = entriesTotal; - progressEventArgs.CurrentEntry = entry; - return progressEventArgs; - } - - internal static ReadProgressEventArgs Started(string archiveName) => new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_Started); - - internal static ReadProgressEventArgs ByteUpdate( - string archiveName, - ZipEntry entry, - long bytesXferred, - long totalBytes) - { - ReadProgressEventArgs progressEventArgs = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_ArchiveBytesRead); - progressEventArgs.CurrentEntry = entry; - progressEventArgs.BytesTransferred = bytesXferred; - progressEventArgs.TotalBytesToTransfer = totalBytes; - return progressEventArgs; - } - - internal static ReadProgressEventArgs Completed(string archiveName) => new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_Completed); - } -} diff --git a/Src/IonicZipFiles/Zip/SaveProgressEventArgs.cs b/Src/IonicZipFiles/Zip/SaveProgressEventArgs.cs deleted file mode 100644 index 38526622..00000000 --- a/Src/IonicZipFiles/Zip/SaveProgressEventArgs.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.SaveProgressEventArgs -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public class SaveProgressEventArgs : ZipProgressEventArgs - { - private int _entriesSaved; - - internal SaveProgressEventArgs( - string archiveName, - bool before, - int entriesTotal, - int entriesSaved, - ZipEntry entry) - : base(archiveName, before ? ZipProgressEventType.Saving_BeforeWriteEntry : ZipProgressEventType.Saving_AfterWriteEntry) - { - this.EntriesTotal = entriesTotal; - this.CurrentEntry = entry; - this._entriesSaved = entriesSaved; - } - - internal SaveProgressEventArgs() - { - } - - internal SaveProgressEventArgs(string archiveName, ZipProgressEventType flavor) - : base(archiveName, flavor) - { - } - - internal static SaveProgressEventArgs ByteUpdate( - string archiveName, - ZipEntry entry, - long bytesXferred, - long totalBytes) - { - SaveProgressEventArgs progressEventArgs = new SaveProgressEventArgs(archiveName, ZipProgressEventType.Saving_EntryBytesRead); - progressEventArgs.ArchiveName = archiveName; - progressEventArgs.CurrentEntry = entry; - progressEventArgs.BytesTransferred = bytesXferred; - progressEventArgs.TotalBytesToTransfer = totalBytes; - return progressEventArgs; - } - - internal static SaveProgressEventArgs Started(string archiveName) => new SaveProgressEventArgs(archiveName, ZipProgressEventType.Saving_Started); - - internal static SaveProgressEventArgs Completed(string archiveName) => new SaveProgressEventArgs(archiveName, ZipProgressEventType.Saving_Completed); - - public int EntriesSaved => this._entriesSaved; - } -} diff --git a/Src/IonicZipFiles/Zip/SetCompressionCallback.cs b/Src/IonicZipFiles/Zip/SetCompressionCallback.cs deleted file mode 100644 index 93025f1a..00000000 --- a/Src/IonicZipFiles/Zip/SetCompressionCallback.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.SetCompressionCallback -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Zlib; - -namespace Ionic.Zip -{ - public delegate CompressionLevel SetCompressionCallback( - string localFileName, - string fileNameInArchive); -} diff --git a/Src/IonicZipFiles/Zip/SfxGenerationException.cs b/Src/IonicZipFiles/Zip/SfxGenerationException.cs deleted file mode 100644 index f2b1aec7..00000000 --- a/Src/IonicZipFiles/Zip/SfxGenerationException.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.SfxGenerationException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d00008")] - [Serializable] - public class SfxGenerationException : ZipException - { - public SfxGenerationException() - { - } - - public SfxGenerationException(string message) - : base(message) - { - } - } -} diff --git a/Src/IonicZipFiles/Zip/SharedUtilities.cs b/Src/IonicZipFiles/Zip/SharedUtilities.cs deleted file mode 100644 index f360e0d7..00000000 --- a/Src/IonicZipFiles/Zip/SharedUtilities.cs +++ /dev/null @@ -1,346 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.SharedUtilities -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Diagnostics; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Text.RegularExpressions; - -namespace Ionic.Zip -{ - internal static class SharedUtilities - { - private static Regex doubleDotRegex1 = new Regex("^(.*/)?([^/\\\\.]+/\\\\.\\\\./)(.+)$"); - private static Encoding ibm437 = Encoding.GetEncoding("IBM437"); - private static Encoding utf8 = Encoding.GetEncoding("UTF-8"); - - public static long GetFileLength(string fileName) - { - if (!File.Exists(fileName)) - throw new FileNotFoundException(fileName); - FileShare share = FileShare.ReadWrite; - using (FileStream fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, share)) - return fileStream.Length; - } - - [Conditional("NETCF")] - public static void Workaround_Ladybug318918(Stream s) => s.Flush(); - - private static string SimplifyFwdSlashPath(string path) - { - if (path.StartsWith("./")) - path = path.Substring(2); - path = path.Replace("/./", "/"); - path = SharedUtilities.doubleDotRegex1.Replace(path, "$1$3"); - return path; - } - - public static string NormalizePathForUseInZipFile(string pathName) - { - if (string.IsNullOrEmpty(pathName)) - return pathName; - if (pathName.Length >= 2 && pathName[1] == ':' && pathName[2] == '\\') - pathName = pathName.Substring(3); - pathName = pathName.Replace('\\', '/'); - while (pathName.StartsWith("/")) - pathName = pathName.Substring(1); - return SharedUtilities.SimplifyFwdSlashPath(pathName); - } - - internal static byte[] StringToByteArray(string value, Encoding encoding) => encoding.GetBytes(value); - - internal static byte[] StringToByteArray(string value) => SharedUtilities.StringToByteArray(value, SharedUtilities.ibm437); - - internal static string Utf8StringFromBuffer(byte[] buf) => SharedUtilities.StringFromBuffer(buf, SharedUtilities.utf8); - - internal static string StringFromBuffer(byte[] buf, Encoding encoding) => encoding.GetString(buf, 0, buf.Length); - - internal static int ReadSignature(Stream s) - { - int num = 0; - try - { - num = SharedUtilities._ReadFourBytes(s, "n/a"); - } - catch (BadReadException ex) - { - } - return num; - } - - internal static int ReadEntrySignature(Stream s) - { - int num = 0; - try - { - num = SharedUtilities._ReadFourBytes(s, "n/a"); - if (num == 134695760) - { - s.Seek(12L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(s); - num = SharedUtilities._ReadFourBytes(s, "n/a"); - if (num != 67324752) - { - s.Seek(8L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(s); - num = SharedUtilities._ReadFourBytes(s, "n/a"); - if (num != 67324752) - { - s.Seek(-24L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(s); - num = SharedUtilities._ReadFourBytes(s, "n/a"); - } - } - } - } - catch (BadReadException ex) - { - } - return num; - } - - internal static int ReadInt(Stream s) => SharedUtilities._ReadFourBytes(s, "Could not read block - no data! (position 0x{0:X8})"); - - private static int _ReadFourBytes(Stream s, string message) - { - int num = 0; - byte[] buffer = new byte[4]; - for (int offset = 0; offset < buffer.Length; ++offset) - num += s.Read(buffer, offset, 1); - if (num != buffer.Length) - throw new BadReadException(string.Format(message, (object) s.Position)); - return (((int) buffer[3] * 256 + (int) buffer[2]) * 256 + (int) buffer[1]) * 256 + (int) buffer[0]; - } - - internal static long FindSignature(Stream stream, int SignatureToFind) - { - long position1 = stream.Position; - int length = 65536; - byte[] numArray = new byte[4] - { - (byte) (SignatureToFind >> 24), - (byte) ((SignatureToFind & 16711680) >> 16), - (byte) ((SignatureToFind & 65280) >> 8), - (byte) (SignatureToFind & (int) byte.MaxValue) - }; - byte[] buffer = new byte[length]; - bool flag = false; - do - { - int num = stream.Read(buffer, 0, buffer.Length); - if (num != 0) - { - for (int index = 0; index < num; ++index) - { - if ((int) buffer[index] == (int) numArray[3]) - { - long position2 = stream.Position; - stream.Seek((long) (index - num), SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(stream); - flag = SharedUtilities.ReadSignature(stream) == SignatureToFind; - if (!flag) - { - stream.Seek(position2, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(stream); - } - else - break; - } - } - } - else - break; - } - while (!flag); - if (flag) - return stream.Position - position1 - 4L; - stream.Seek(position1, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(stream); - return -1; - } - - internal static DateTime AdjustTime_Reverse(DateTime time) - { - if (time.Kind == DateTimeKind.Utc) - return time; - DateTime dateTime = time; - if (DateTime.Now.IsDaylightSavingTime() && !time.IsDaylightSavingTime()) - dateTime = time - new TimeSpan(1, 0, 0); - else if (!DateTime.Now.IsDaylightSavingTime() && time.IsDaylightSavingTime()) - dateTime = time + new TimeSpan(1, 0, 0); - return dateTime; - } - - internal static DateTime PackedToDateTime(int packedDateTime) - { - if (packedDateTime == (int) ushort.MaxValue || packedDateTime == 0) - return new DateTime(1995, 1, 1, 0, 0, 0, 0); - short num1 = (short) (packedDateTime & (int) ushort.MaxValue); - short num2 = (short) (((long) packedDateTime & 4294901760L) >> 16); - int year = 1980 + (((int) num2 & 65024) >> 9); - int month = ((int) num2 & 480) >> 5; - int day = (int) num2 & 31; - int hour = ((int) num1 & 63488) >> 11; - int minute = ((int) num1 & 2016) >> 5; - int second = ((int) num1 & 31) * 2; - if (second >= 60) - { - ++minute; - second = 0; - } - if (minute >= 60) - { - ++hour; - minute = 0; - } - if (hour >= 24) - { - ++day; - hour = 0; - } - DateTime dateTime = DateTime.Now; - bool flag = false; - try - { - dateTime = new DateTime(year, month, day, hour, minute, second, 0); - flag = true; - } - catch (ArgumentOutOfRangeException ex1) - { - if (year == 1980) - { - if (month != 0) - { - if (day != 0) - goto label_17; - } - try - { - dateTime = new DateTime(1980, 1, 1, hour, minute, second, 0); - flag = true; - goto label_40; - } - catch (ArgumentOutOfRangeException ex2) - { - try - { - dateTime = new DateTime(1980, 1, 1, 0, 0, 0, 0); - flag = true; - goto label_40; - } - catch (ArgumentOutOfRangeException ex3) - { - goto label_40; - } - } - } -label_17: - try - { - while (year < 1980) - ++year; - while (year > 2030) - --year; - while (month < 1) - ++month; - while (month > 12) - --month; - while (day < 1) - ++day; - while (day > 28) - --day; - while (minute < 0) - ++minute; - while (minute > 59) - --minute; - while (second < 0) - ++second; - while (second > 59) - --second; - dateTime = new DateTime(year, month, day, hour, minute, second, 0); - flag = true; - } - catch (ArgumentOutOfRangeException ex4) - { - } - } -label_40: - if (!flag) - throw new ZipException(string.Format("Bad date/time format in the zip file. ({0})", (object) string.Format("y({0}) m({1}) d({2}) h({3}) m({4}) s({5})", (object) year, (object) month, (object) day, (object) hour, (object) minute, (object) second))); - return DateTime.SpecifyKind(dateTime, DateTimeKind.Local); - } - - internal static int DateTimeToPacked(DateTime time) - { - time = time.ToLocalTime(); - return (int) (ushort) (time.Day & 31 | time.Month << 5 & 480 | time.Year - 1980 << 9 & 65024) << 16 | (int) (ushort) (time.Second / 2 & 31 | time.Minute << 5 & 2016 | time.Hour << 11 & 63488); - } - - public static void CreateAndOpenUniqueTempFile(string dir, out Stream fs, out string filename) - { - for (int index = 0; index < 3; ++index) - { - try - { - filename = Path.Combine(dir, SharedUtilities.InternalGetTempFileName()); - fs = (Stream) new FileStream(filename, FileMode.CreateNew); - return; - } - catch (IOException ex) - { - if (index == 2) - throw; - } - } - throw new IOException(); - } - - public static string InternalGetTempFileName() => "DotNetZip-" + SharedUtilities.GenerateRandomStringImpl(8, 0) + ".tmp"; - - internal static string GenerateRandomStringImpl(int length, int delta) - { - bool flag = delta == 0; - Random random = new Random(); - char[] chArray = new char[length]; - for (int index = 0; index < length; ++index) - { - if (flag) - delta = random.Next(2) == 0 ? 65 : 97; - chArray[index] = (char) (random.Next(26) + delta); - } - return new string(chArray); - } - - internal static int ReadWithRetry( - Stream s, - byte[] buffer, - int offset, - int count, - string FileName) - { - int num; - bool flag; - do - { - try - { - num = s.Read(buffer, offset, count); - flag = true; - } - catch (IOException ex) - { - throw; - } - } - while (!flag); - return num; - } - - private static uint _HRForException(Exception ex1) => (uint) Marshal.GetHRForException(ex1); - } -} diff --git a/Src/IonicZipFiles/Zip/WriteDelegate.cs b/Src/IonicZipFiles/Zip/WriteDelegate.cs deleted file mode 100644 index f06b873c..00000000 --- a/Src/IonicZipFiles/Zip/WriteDelegate.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.WriteDelegate -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.IO; - -namespace Ionic.Zip -{ - public delegate void WriteDelegate(string entryName, Stream stream); -} diff --git a/Src/IonicZipFiles/Zip/Zip64Option.cs b/Src/IonicZipFiles/Zip/Zip64Option.cs deleted file mode 100644 index 3f92b743..00000000 --- a/Src/IonicZipFiles/Zip/Zip64Option.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.Zip64Option -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum Zip64Option - { - Default = 0, - Never = 0, - AsNecessary = 1, - Always = 2, - } -} diff --git a/Src/IonicZipFiles/Zip/ZipCipherStream.cs b/Src/IonicZipFiles/Zip/ZipCipherStream.cs deleted file mode 100644 index 4ab5e745..00000000 --- a/Src/IonicZipFiles/Zip/ZipCipherStream.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipCipherStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Zip -{ - internal class ZipCipherStream : Stream - { - private ZipCrypto _cipher; - private Stream _s; - private CryptoMode _mode; - - public ZipCipherStream(Stream s, ZipCrypto cipher, CryptoMode mode) - { - this._cipher = cipher; - this._s = s; - this._mode = mode; - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (this._mode == CryptoMode.Encrypt) - throw new NotSupportedException("This stream does not encrypt via Read()"); - if (buffer == null) - throw new ArgumentNullException(nameof (buffer)); - byte[] numArray1 = new byte[count]; - int length = this._s.Read(numArray1, 0, count); - byte[] numArray2 = this._cipher.DecryptMessage(numArray1, length); - for (int index = 0; index < length; ++index) - buffer[offset + index] = numArray2[index]; - return length; - } - - public override void Write(byte[] buffer, int offset, int count) - { - if (this._mode == CryptoMode.Decrypt) - throw new NotSupportedException("This stream does not Decrypt via Write()"); - if (buffer == null) - throw new ArgumentNullException(nameof (buffer)); - if (count == 0) - return; - byte[] plainText; - if (offset != 0) - { - plainText = new byte[count]; - for (int index = 0; index < count; ++index) - plainText[index] = buffer[offset + index]; - } - else - plainText = buffer; - byte[] buffer1 = this._cipher.EncryptMessage(plainText, count); - this._s.Write(buffer1, 0, buffer1.Length); - } - - public override bool CanRead => this._mode == CryptoMode.Decrypt; - - public override bool CanSeek => false; - - public override bool CanWrite => this._mode == CryptoMode.Encrypt; - - public override void Flush() - { - } - - public override long Length => throw new NotSupportedException(); - - public override long Position - { - get => throw new NotSupportedException(); - set => throw new NotSupportedException(); - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); - - public override void SetLength(long value) => throw new NotSupportedException(); - } -} diff --git a/Src/IonicZipFiles/Zip/ZipConstants.cs b/Src/IonicZipFiles/Zip/ZipConstants.cs deleted file mode 100644 index 6353d618..00000000 --- a/Src/IonicZipFiles/Zip/ZipConstants.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipConstants -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - internal static class ZipConstants - { - public const uint PackedToRemovableMedia = 808471376; - public const uint Zip64EndOfCentralDirectoryRecordSignature = 101075792; - public const uint Zip64EndOfCentralDirectoryLocatorSignature = 117853008; - public const uint EndOfCentralDirectorySignature = 101010256; - public const int ZipEntrySignature = 67324752; - public const int ZipEntryDataDescriptorSignature = 134695760; - public const int SplitArchiveSignature = 134695760; - public const int ZipDirEntrySignature = 33639248; - public const int AesKeySize = 192; - public const int AesBlockSize = 128; - public const ushort AesAlgId128 = 26126; - public const ushort AesAlgId192 = 26127; - public const ushort AesAlgId256 = 26128; - } -} diff --git a/Src/IonicZipFiles/Zip/ZipContainer.cs b/Src/IonicZipFiles/Zip/ZipContainer.cs deleted file mode 100644 index 1b0d8917..00000000 --- a/Src/IonicZipFiles/Zip/ZipContainer.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipContainer -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Zlib; -using System; -using System.IO; -using System.Text; - -namespace Ionic.Zip -{ - internal class ZipContainer - { - private ZipFile _zf; - private ZipOutputStream _zos; - private ZipInputStream _zis; - - public ZipContainer(object o) - { - this._zf = o as ZipFile; - this._zos = o as ZipOutputStream; - this._zis = o as ZipInputStream; - } - - public ZipFile ZipFile => this._zf; - - public ZipOutputStream ZipOutputStream => this._zos; - - public string Name - { - get - { - if (this._zf != null) - return this._zf.Name; - if (this._zis != null) - throw new NotSupportedException(); - return this._zos.Name; - } - } - - public string Password - { - get - { - if (this._zf != null) - return this._zf._Password; - return this._zis != null ? this._zis._Password : this._zos._password; - } - } - - public Zip64Option Zip64 - { - get - { - if (this._zf != null) - return this._zf._zip64; - if (this._zis != null) - throw new NotSupportedException(); - return this._zos._zip64; - } - } - - public int BufferSize - { - get - { - if (this._zf != null) - return this._zf.BufferSize; - if (this._zis != null) - throw new NotSupportedException(); - return 0; - } - } - - public int CodecBufferSize - { - get - { - if (this._zf != null) - return this._zf.CodecBufferSize; - return this._zis != null ? this._zis.CodecBufferSize : this._zos.CodecBufferSize; - } - } - - public CompressionStrategy Strategy => this._zf != null ? this._zf.Strategy : this._zos.Strategy; - - public Zip64Option UseZip64WhenSaving => this._zf != null ? this._zf.UseZip64WhenSaving : this._zos.EnableZip64; - - public Encoding AlternateEncoding - { - get - { - if (this._zf != null) - return this._zf.AlternateEncoding; - return this._zos != null ? this._zos.AlternateEncoding : (Encoding) null; - } - } - - public Encoding DefaultEncoding - { - get - { - if (this._zf != null) - return ZipFile.DefaultEncoding; - return this._zos != null ? ZipOutputStream.DefaultEncoding : (Encoding) null; - } - } - - public ZipOption AlternateEncodingUsage - { - get - { - if (this._zf != null) - return this._zf.AlternateEncodingUsage; - return this._zos != null ? this._zos.AlternateEncodingUsage : ZipOption.Default; - } - } - - public Stream ReadStream => this._zf != null ? this._zf.ReadStream : this._zis.ReadStream; - } -} diff --git a/Src/IonicZipFiles/Zip/ZipCrypto.cs b/Src/IonicZipFiles/Zip/ZipCrypto.cs deleted file mode 100644 index 3f4fef03..00000000 --- a/Src/IonicZipFiles/Zip/ZipCrypto.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipCrypto -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Crc; -using System; -using System.IO; - -namespace Ionic.Zip -{ - internal class ZipCrypto - { - private uint[] _Keys = new uint[3] - { - 305419896U, - 591751049U, - 878082192U - }; - private CRC32 crc32 = new CRC32(); - - private ZipCrypto() - { - } - - public static ZipCrypto ForWrite(string password) - { - ZipCrypto zipCrypto = new ZipCrypto(); - if (password == null) - throw new BadPasswordException("This entry requires a password."); - zipCrypto.InitCipher(password); - return zipCrypto; - } - - public static ZipCrypto ForRead(string password, ZipEntry e) - { - Stream archiveStream = e._archiveStream; - e._WeakEncryptionHeader = new byte[12]; - byte[] encryptionHeader = e._WeakEncryptionHeader; - ZipCrypto zipCrypto = new ZipCrypto(); - if (password == null) - throw new BadPasswordException("This entry requires a password."); - zipCrypto.InitCipher(password); - ZipEntry.ReadWeakEncryptionHeader(archiveStream, encryptionHeader); - byte[] numArray = zipCrypto.DecryptMessage(encryptionHeader, encryptionHeader.Length); - if ((int) numArray[11] != (int) (byte) (e._Crc32 >> 24 & (int) byte.MaxValue)) - { - if (((int) e._BitField & 8) != 8) - throw new BadPasswordException("The password did not match."); - if ((int) numArray[11] != (int) (byte) (e._TimeBlob >> 8 & (int) byte.MaxValue)) - throw new BadPasswordException("The password did not match."); - } - return zipCrypto; - } - - private byte MagicByte - { - get - { - ushort num = (ushort) ((uint) (ushort) (this._Keys[2] & (uint) ushort.MaxValue) | 2U); - return (byte) ((int) num * ((int) num ^ 1) >> 8); - } - } - - public byte[] DecryptMessage(byte[] cipherText, int length) - { - if (cipherText == null) - throw new ArgumentNullException(nameof (cipherText)); - if (length > cipherText.Length) - throw new ArgumentOutOfRangeException(nameof (length), "Bad length during Decryption: the length parameter must be smaller than or equal to the size of the destination array."); - byte[] numArray = new byte[length]; - for (int index = 0; index < length; ++index) - { - byte byteValue = (byte) ((uint) cipherText[index] ^ (uint) this.MagicByte); - this.UpdateKeys(byteValue); - numArray[index] = byteValue; - } - return numArray; - } - - public byte[] EncryptMessage(byte[] plainText, int length) - { - if (plainText == null) - throw new ArgumentNullException("plaintext"); - if (length > plainText.Length) - throw new ArgumentOutOfRangeException(nameof (length), "Bad length during Encryption: The length parameter must be smaller than or equal to the size of the destination array."); - byte[] numArray = new byte[length]; - for (int index = 0; index < length; ++index) - { - byte byteValue = plainText[index]; - numArray[index] = (byte) ((uint) plainText[index] ^ (uint) this.MagicByte); - this.UpdateKeys(byteValue); - } - return numArray; - } - - public void InitCipher(string passphrase) - { - byte[] byteArray = SharedUtilities.StringToByteArray(passphrase); - for (int index = 0; index < passphrase.Length; ++index) - this.UpdateKeys(byteArray[index]); - } - - private void UpdateKeys(byte byteValue) - { - this._Keys[0] = (uint) this.crc32.ComputeCrc32((int) this._Keys[0], byteValue); - this._Keys[1] = this._Keys[1] + (uint) (byte) this._Keys[0]; - this._Keys[1] = (uint) ((int) this._Keys[1] * 134775813 + 1); - this._Keys[2] = (uint) this.crc32.ComputeCrc32((int) this._Keys[2], (byte) (this._Keys[1] >> 24)); - } - } -} diff --git a/Src/IonicZipFiles/Zip/ZipEntry.cs b/Src/IonicZipFiles/Zip/ZipEntry.cs deleted file mode 100644 index 7c70a9d0..00000000 --- a/Src/IonicZipFiles/Zip/ZipEntry.cs +++ /dev/null @@ -1,3581 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipEntry -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.BZip2; -using Ionic.Crc; -using Ionic.Zlib; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d00004")] - [ComVisible(true)] - public class ZipEntry - { - private short _VersionMadeBy; - private short _InternalFileAttrs; - private int _ExternalFileAttrs; - private short _filenameLength; - private short _extraFieldLength; - private short _commentLength; - private ZipCrypto _zipCrypto_forExtract; - private ZipCrypto _zipCrypto_forWrite; - internal DateTime _LastModified; - private DateTime _Mtime; - private DateTime _Atime; - private DateTime _Ctime; - private bool _ntfsTimesAreSet; - private bool _emitNtfsTimes = true; - private bool _emitUnixTimes; - private bool _TrimVolumeFromFullyQualifiedPaths = true; - internal string _LocalFileName; - private string _FileNameInArchive; - internal short _VersionNeeded; - internal short _BitField; - internal short _CompressionMethod; - private short _CompressionMethod_FromZipFile; - private CompressionLevel _CompressionLevel; - internal string _Comment; - private bool _IsDirectory; - private byte[] _CommentBytes; - internal long _CompressedSize; - internal long _CompressedFileDataSize; - internal long _UncompressedSize; - internal int _TimeBlob; - private bool _crcCalculated; - internal int _Crc32; - internal byte[] _Extra; - private bool _metadataChanged; - private bool _restreamRequiredOnSave; - private bool _sourceIsEncrypted; - private bool _skippedDuringSave; - private uint _diskNumber; - private static Encoding ibm437 = Encoding.GetEncoding("IBM437"); - private Encoding _actualEncoding; - internal ZipContainer _container; - private long __FileDataPosition = -1; - private byte[] _EntryHeader; - internal long _RelativeOffsetOfLocalHeader; - private long _future_ROLH; - private long _TotalEntrySize; - private int _LengthOfHeader; - private int _LengthOfTrailer; - internal bool _InputUsesZip64; - private uint _UnsupportedAlgorithmId; - internal string _Password; - internal ZipEntrySource _Source; - internal EncryptionAlgorithm _Encryption; - internal EncryptionAlgorithm _Encryption_FromZipFile; - internal byte[] _WeakEncryptionHeader; - internal Stream _archiveStream; - private Stream _sourceStream; - private long? _sourceStreamOriginalPosition; - private bool _sourceWasJitProvided; - private bool _ioOperationCanceled; - private bool _presumeZip64; - private bool? _entryRequiresZip64; - private bool? _OutputUsesZip64; - private bool _IsText; - private ZipEntryTimestamp _timestamp; - private static DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); - private static DateTime _win32Epoch = DateTime.FromFileTimeUtc(0L); - private static DateTime _zeroHour = new DateTime(1, 1, 1, 0, 0, 0, DateTimeKind.Utc); - private WriteDelegate _WriteDelegate; - private OpenDelegate _OpenDelegate; - private CloseDelegate _CloseDelegate; - private Stream _inputDecryptorStream; - private int _readExtraDepth; - private object _outputLock = new object(); - private ExtractExistingFileAction \u003CExtractExistingFile\u003Ek__BackingField; - private ZipErrorAction \u003CZipErrorAction\u003Ek__BackingField; - private SetCompressionCallback \u003CSetCompression\u003Ek__BackingField; - private Encoding \u003CProvisionalAlternateEncoding\u003Ek__BackingField; - private Encoding \u003CAlternateEncoding\u003Ek__BackingField; - private ZipOption \u003CAlternateEncodingUsage\u003Ek__BackingField; - - internal bool AttributesIndicateDirectory => this._InternalFileAttrs == (short) 0 && (this._ExternalFileAttrs & 16) == 16; - - internal void ResetDirEntry() - { - this.__FileDataPosition = -1L; - this._LengthOfHeader = 0; - } - - public string Info - { - get - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append(string.Format(" ZipEntry: {0}\n", (object) this.FileName)).Append(string.Format(" Version Made By: {0}\n", (object) this._VersionMadeBy)).Append(string.Format(" Needed to extract: {0}\n", (object) this.VersionNeeded)); - if (this._IsDirectory) - stringBuilder.Append(" Entry type: directory\n"); - else - stringBuilder.Append(string.Format(" File type: {0}\n", this._IsText ? (object) "text" : (object) "binary")).Append(string.Format(" Compression: {0}\n", (object) this.CompressionMethod)).Append(string.Format(" Compressed: 0x{0:X}\n", (object) this.CompressedSize)).Append(string.Format(" Uncompressed: 0x{0:X}\n", (object) this.UncompressedSize)).Append(string.Format(" CRC32: 0x{0:X8}\n", (object) this._Crc32)); - stringBuilder.Append(string.Format(" Disk Number: {0}\n", (object) this._diskNumber)); - if (this._RelativeOffsetOfLocalHeader > (long) uint.MaxValue) - stringBuilder.Append(string.Format(" Relative Offset: 0x{0:X16}\n", (object) this._RelativeOffsetOfLocalHeader)); - else - stringBuilder.Append(string.Format(" Relative Offset: 0x{0:X8}\n", (object) this._RelativeOffsetOfLocalHeader)); - stringBuilder.Append(string.Format(" Bit Field: 0x{0:X4}\n", (object) this._BitField)).Append(string.Format(" Encrypted?: {0}\n", (object) this._sourceIsEncrypted)).Append(string.Format(" Timeblob: 0x{0:X8}\n", (object) this._TimeBlob)).Append(string.Format(" Time: {0}\n", (object) SharedUtilities.PackedToDateTime(this._TimeBlob))); - stringBuilder.Append(string.Format(" Is Zip64?: {0}\n", (object) this._InputUsesZip64)); - if (!string.IsNullOrEmpty(this._Comment)) - stringBuilder.Append(string.Format(" Comment: {0}\n", (object) this._Comment)); - stringBuilder.Append("\n"); - return stringBuilder.ToString(); - } - } - - internal static ZipEntry ReadDirEntry(ZipFile zf, Dictionary previouslySeen) - { - Stream readStream = zf.ReadStream; - Encoding encoding = zf.AlternateEncodingUsage == ZipOption.Always ? zf.AlternateEncoding : ZipFile.DefaultEncoding; - int signature = SharedUtilities.ReadSignature(readStream); - if (ZipEntry.IsNotValidZipDirEntrySig(signature)) - { - readStream.Seek(-4L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(readStream); - if (signature != 101010256 && signature != 101075792 && signature != 67324752) - throw new BadReadException(string.Format(" Bad signature (0x{0:X8}) at position 0x{1:X8}", (object) signature, (object) readStream.Position)); - return (ZipEntry) null; - } - int num1 = 46; - byte[] buffer = new byte[42]; - if (readStream.Read(buffer, 0, buffer.Length) != buffer.Length) - return (ZipEntry) null; - int num2 = 0; - ZipEntry zipEntry1 = new ZipEntry(); - zipEntry1.AlternateEncoding = encoding; - zipEntry1._Source = ZipEntrySource.ZipFile; - zipEntry1._container = new ZipContainer((object) zf); - ZipEntry zipEntry2 = zipEntry1; - byte[] numArray1 = buffer; - int index1 = num2; - int num3 = index1 + 1; - int num4 = (int) numArray1[index1]; - byte[] numArray2 = buffer; - int index2 = num3; - int num5 = index2 + 1; - int num6 = (int) numArray2[index2] * 256; - int num7 = (int) (short) (num4 + num6); - zipEntry2._VersionMadeBy = (short) num7; - ZipEntry zipEntry3 = zipEntry1; - byte[] numArray3 = buffer; - int index3 = num5; - int num8 = index3 + 1; - int num9 = (int) numArray3[index3]; - byte[] numArray4 = buffer; - int index4 = num8; - int num10 = index4 + 1; - int num11 = (int) numArray4[index4] * 256; - int num12 = (int) (short) (num9 + num11); - zipEntry3._VersionNeeded = (short) num12; - ZipEntry zipEntry4 = zipEntry1; - byte[] numArray5 = buffer; - int index5 = num10; - int num13 = index5 + 1; - int num14 = (int) numArray5[index5]; - byte[] numArray6 = buffer; - int index6 = num13; - int num15 = index6 + 1; - int num16 = (int) numArray6[index6] * 256; - int num17 = (int) (short) (num14 + num16); - zipEntry4._BitField = (short) num17; - ZipEntry zipEntry5 = zipEntry1; - byte[] numArray7 = buffer; - int index7 = num15; - int num18 = index7 + 1; - int num19 = (int) numArray7[index7]; - byte[] numArray8 = buffer; - int index8 = num18; - int num20 = index8 + 1; - int num21 = (int) numArray8[index8] * 256; - int num22 = (int) (short) (num19 + num21); - zipEntry5._CompressionMethod = (short) num22; - ZipEntry zipEntry6 = zipEntry1; - byte[] numArray9 = buffer; - int index9 = num20; - int num23 = index9 + 1; - int num24 = (int) numArray9[index9]; - byte[] numArray10 = buffer; - int index10 = num23; - int num25 = index10 + 1; - int num26 = (int) numArray10[index10] * 256; - int num27 = num24 + num26; - byte[] numArray11 = buffer; - int index11 = num25; - int num28 = index11 + 1; - int num29 = (int) numArray11[index11] * 256 * 256; - int num30 = num27 + num29; - byte[] numArray12 = buffer; - int index12 = num28; - int num31 = index12 + 1; - int num32 = (int) numArray12[index12] * 256 * 256 * 256; - int num33 = num30 + num32; - zipEntry6._TimeBlob = num33; - zipEntry1._LastModified = SharedUtilities.PackedToDateTime(zipEntry1._TimeBlob); - zipEntry1._timestamp |= ZipEntryTimestamp.DOS; - ZipEntry zipEntry7 = zipEntry1; - byte[] numArray13 = buffer; - int index13 = num31; - int num34 = index13 + 1; - int num35 = (int) numArray13[index13]; - byte[] numArray14 = buffer; - int index14 = num34; - int num36 = index14 + 1; - int num37 = (int) numArray14[index14] * 256; - int num38 = num35 + num37; - byte[] numArray15 = buffer; - int index15 = num36; - int num39 = index15 + 1; - int num40 = (int) numArray15[index15] * 256 * 256; - int num41 = num38 + num40; - byte[] numArray16 = buffer; - int index16 = num39; - int num42 = index16 + 1; - int num43 = (int) numArray16[index16] * 256 * 256 * 256; - int num44 = num41 + num43; - zipEntry7._Crc32 = num44; - ZipEntry zipEntry8 = zipEntry1; - byte[] numArray17 = buffer; - int index17 = num42; - int num45 = index17 + 1; - int num46 = (int) numArray17[index17]; - byte[] numArray18 = buffer; - int index18 = num45; - int num47 = index18 + 1; - int num48 = (int) numArray18[index18] * 256; - int num49 = num46 + num48; - byte[] numArray19 = buffer; - int index19 = num47; - int num50 = index19 + 1; - int num51 = (int) numArray19[index19] * 256 * 256; - int num52 = num49 + num51; - byte[] numArray20 = buffer; - int index20 = num50; - int num53 = index20 + 1; - int num54 = (int) numArray20[index20] * 256 * 256 * 256; - long num55 = (long) (uint) (num52 + num54); - zipEntry8._CompressedSize = num55; - ZipEntry zipEntry9 = zipEntry1; - byte[] numArray21 = buffer; - int index21 = num53; - int num56 = index21 + 1; - int num57 = (int) numArray21[index21]; - byte[] numArray22 = buffer; - int index22 = num56; - int num58 = index22 + 1; - int num59 = (int) numArray22[index22] * 256; - int num60 = num57 + num59; - byte[] numArray23 = buffer; - int index23 = num58; - int num61 = index23 + 1; - int num62 = (int) numArray23[index23] * 256 * 256; - int num63 = num60 + num62; - byte[] numArray24 = buffer; - int index24 = num61; - int num64 = index24 + 1; - int num65 = (int) numArray24[index24] * 256 * 256 * 256; - long num66 = (long) (uint) (num63 + num65); - zipEntry9._UncompressedSize = num66; - zipEntry1._CompressionMethod_FromZipFile = zipEntry1._CompressionMethod; - ZipEntry zipEntry10 = zipEntry1; - byte[] numArray25 = buffer; - int index25 = num64; - int num67 = index25 + 1; - int num68 = (int) numArray25[index25]; - byte[] numArray26 = buffer; - int index26 = num67; - int num69 = index26 + 1; - int num70 = (int) numArray26[index26] * 256; - int num71 = (int) (short) (num68 + num70); - zipEntry10._filenameLength = (short) num71; - ZipEntry zipEntry11 = zipEntry1; - byte[] numArray27 = buffer; - int index27 = num69; - int num72 = index27 + 1; - int num73 = (int) numArray27[index27]; - byte[] numArray28 = buffer; - int index28 = num72; - int num74 = index28 + 1; - int num75 = (int) numArray28[index28] * 256; - int num76 = (int) (short) (num73 + num75); - zipEntry11._extraFieldLength = (short) num76; - ZipEntry zipEntry12 = zipEntry1; - byte[] numArray29 = buffer; - int index29 = num74; - int num77 = index29 + 1; - int num78 = (int) numArray29[index29]; - byte[] numArray30 = buffer; - int index30 = num77; - int num79 = index30 + 1; - int num80 = (int) numArray30[index30] * 256; - int num81 = (int) (short) (num78 + num80); - zipEntry12._commentLength = (short) num81; - ZipEntry zipEntry13 = zipEntry1; - byte[] numArray31 = buffer; - int index31 = num79; - int num82 = index31 + 1; - int num83 = (int) numArray31[index31]; - byte[] numArray32 = buffer; - int index32 = num82; - int num84 = index32 + 1; - int num85 = (int) numArray32[index32] * 256; - int num86 = num83 + num85; - zipEntry13._diskNumber = (uint) num86; - ZipEntry zipEntry14 = zipEntry1; - byte[] numArray33 = buffer; - int index33 = num84; - int num87 = index33 + 1; - int num88 = (int) numArray33[index33]; - byte[] numArray34 = buffer; - int index34 = num87; - int num89 = index34 + 1; - int num90 = (int) numArray34[index34] * 256; - int num91 = (int) (short) (num88 + num90); - zipEntry14._InternalFileAttrs = (short) num91; - ZipEntry zipEntry15 = zipEntry1; - byte[] numArray35 = buffer; - int index35 = num89; - int num92 = index35 + 1; - int num93 = (int) numArray35[index35]; - byte[] numArray36 = buffer; - int index36 = num92; - int num94 = index36 + 1; - int num95 = (int) numArray36[index36] * 256; - int num96 = num93 + num95; - byte[] numArray37 = buffer; - int index37 = num94; - int num97 = index37 + 1; - int num98 = (int) numArray37[index37] * 256 * 256; - int num99 = num96 + num98; - byte[] numArray38 = buffer; - int index38 = num97; - int num100 = index38 + 1; - int num101 = (int) numArray38[index38] * 256 * 256 * 256; - int num102 = num99 + num101; - zipEntry15._ExternalFileAttrs = num102; - ZipEntry zipEntry16 = zipEntry1; - byte[] numArray39 = buffer; - int index39 = num100; - int num103 = index39 + 1; - int num104 = (int) numArray39[index39]; - byte[] numArray40 = buffer; - int index40 = num103; - int num105 = index40 + 1; - int num106 = (int) numArray40[index40] * 256; - int num107 = num104 + num106; - byte[] numArray41 = buffer; - int index41 = num105; - int num108 = index41 + 1; - int num109 = (int) numArray41[index41] * 256 * 256; - int num110 = num107 + num109; - byte[] numArray42 = buffer; - int index42 = num108; - int num111 = index42 + 1; - int num112 = (int) numArray42[index42] * 256 * 256 * 256; - long num113 = (long) (uint) (num110 + num112); - zipEntry16._RelativeOffsetOfLocalHeader = num113; - zipEntry1.IsText = ((int) zipEntry1._InternalFileAttrs & 1) == 1; - byte[] numArray43 = new byte[(int) zipEntry1._filenameLength]; - int num114 = readStream.Read(numArray43, 0, numArray43.Length); - int num115 = num1 + num114; - zipEntry1._FileNameInArchive = ((int) zipEntry1._BitField & 2048) != 2048 ? SharedUtilities.StringFromBuffer(numArray43, encoding) : SharedUtilities.Utf8StringFromBuffer(numArray43); - while (previouslySeen.ContainsKey(zipEntry1._FileNameInArchive)) - { - zipEntry1._FileNameInArchive = ZipEntry.CopyHelper.AppendCopyToFileName(zipEntry1._FileNameInArchive); - zipEntry1._metadataChanged = true; - } - if (zipEntry1.AttributesIndicateDirectory) - zipEntry1.MarkAsDirectory(); - else if (zipEntry1._FileNameInArchive.EndsWith("/")) - zipEntry1.MarkAsDirectory(); - zipEntry1._CompressedFileDataSize = zipEntry1._CompressedSize; - if (((int) zipEntry1._BitField & 1) == 1) - { - zipEntry1._Encryption_FromZipFile = zipEntry1._Encryption = EncryptionAlgorithm.PkzipWeak; - zipEntry1._sourceIsEncrypted = true; - } - if (zipEntry1._extraFieldLength > (short) 0) - { - zipEntry1._InputUsesZip64 = zipEntry1._CompressedSize == (long) uint.MaxValue || zipEntry1._UncompressedSize == (long) uint.MaxValue || zipEntry1._RelativeOffsetOfLocalHeader == (long) uint.MaxValue; - num115 += zipEntry1.ProcessExtraField(readStream, zipEntry1._extraFieldLength); - zipEntry1._CompressedFileDataSize = zipEntry1._CompressedSize; - } - if (zipEntry1._Encryption == EncryptionAlgorithm.PkzipWeak) - zipEntry1._CompressedFileDataSize -= 12L; - if (((int) zipEntry1._BitField & 8) == 8) - { - if (zipEntry1._InputUsesZip64) - zipEntry1._LengthOfTrailer += 24; - else - zipEntry1._LengthOfTrailer += 16; - } - zipEntry1.AlternateEncoding = ((int) zipEntry1._BitField & 2048) == 2048 ? Encoding.UTF8 : encoding; - zipEntry1.AlternateEncodingUsage = ZipOption.Always; - if (zipEntry1._commentLength > (short) 0) - { - byte[] numArray44 = new byte[(int) zipEntry1._commentLength]; - int num116 = readStream.Read(numArray44, 0, numArray44.Length); - int num117 = num115 + num116; - zipEntry1._Comment = ((int) zipEntry1._BitField & 2048) != 2048 ? SharedUtilities.StringFromBuffer(numArray44, encoding) : SharedUtilities.Utf8StringFromBuffer(numArray44); - } - return zipEntry1; - } - - internal static bool IsNotValidZipDirEntrySig(int signature) => signature != 33639248; - - public ZipEntry() - { - this._CompressionMethod = (short) 8; - this._CompressionLevel = CompressionLevel.Default; - this._Encryption = EncryptionAlgorithm.None; - this._Source = ZipEntrySource.None; - this.AlternateEncoding = Encoding.GetEncoding("IBM437"); - this.AlternateEncodingUsage = ZipOption.Default; - } - - public DateTime LastModified - { - get => this._LastModified.ToLocalTime(); - set - { - this._LastModified = value.Kind == DateTimeKind.Unspecified ? DateTime.SpecifyKind(value, DateTimeKind.Local) : value.ToLocalTime(); - this._Mtime = SharedUtilities.AdjustTime_Reverse(this._LastModified).ToUniversalTime(); - this._metadataChanged = true; - } - } - - private int BufferSize => this._container.BufferSize; - - public DateTime ModifiedTime - { - get => this._Mtime; - set => this.SetEntryTimes(this._Ctime, this._Atime, value); - } - - public DateTime AccessedTime - { - get => this._Atime; - set => this.SetEntryTimes(this._Ctime, value, this._Mtime); - } - - public DateTime CreationTime - { - get => this._Ctime; - set => this.SetEntryTimes(value, this._Atime, this._Mtime); - } - - public void SetEntryTimes(DateTime created, DateTime accessed, DateTime modified) - { - this._ntfsTimesAreSet = true; - if (created == ZipEntry._zeroHour && created.Kind == ZipEntry._zeroHour.Kind) - created = ZipEntry._win32Epoch; - if (accessed == ZipEntry._zeroHour && accessed.Kind == ZipEntry._zeroHour.Kind) - accessed = ZipEntry._win32Epoch; - if (modified == ZipEntry._zeroHour && modified.Kind == ZipEntry._zeroHour.Kind) - modified = ZipEntry._win32Epoch; - this._Ctime = created.ToUniversalTime(); - this._Atime = accessed.ToUniversalTime(); - this._Mtime = modified.ToUniversalTime(); - this._LastModified = this._Mtime; - if (!this._emitUnixTimes && !this._emitNtfsTimes) - this._emitNtfsTimes = true; - this._metadataChanged = true; - } - - public bool EmitTimesInWindowsFormatWhenSaving - { - get => this._emitNtfsTimes; - set - { - this._emitNtfsTimes = value; - this._metadataChanged = true; - } - } - - public bool EmitTimesInUnixFormatWhenSaving - { - get => this._emitUnixTimes; - set - { - this._emitUnixTimes = value; - this._metadataChanged = true; - } - } - - public ZipEntryTimestamp Timestamp => this._timestamp; - - public FileAttributes Attributes - { - get => (FileAttributes) this._ExternalFileAttrs; - set - { - this._ExternalFileAttrs = (int) value; - this._VersionMadeBy = (short) 45; - this._metadataChanged = true; - } - } - - internal string LocalFileName => this._LocalFileName; - - public string FileName - { - get => this._FileNameInArchive; - set - { - if (this._container.ZipFile == null) - throw new ZipException("Cannot rename; this is not supported in ZipOutputStream/ZipInputStream."); - string name = !string.IsNullOrEmpty(value) ? ZipEntry.NameInArchive(value, (string) null) : throw new ZipException("The FileName must be non empty and non-null."); - if (this._FileNameInArchive == name) - return; - this._container.ZipFile.RemoveEntry(this); - this._container.ZipFile.InternalAddEntry(name, this); - this._FileNameInArchive = name; - this._container.ZipFile.NotifyEntryChanged(); - this._metadataChanged = true; - } - } - - public Stream InputStream - { - get => this._sourceStream; - set - { - if (this._Source != ZipEntrySource.Stream) - throw new ZipException("You must not set the input stream for this entry."); - this._sourceWasJitProvided = true; - this._sourceStream = value; - } - } - - public bool InputStreamWasJitProvided => this._sourceWasJitProvided; - - public ZipEntrySource Source => this._Source; - - public short VersionNeeded => this._VersionNeeded; - - public string Comment - { - get => this._Comment; - set - { - this._Comment = value; - this._metadataChanged = true; - } - } - - public bool? RequiresZip64 => this._entryRequiresZip64; - - public bool? OutputUsedZip64 => this._OutputUsesZip64; - - public short BitField => this._BitField; - - public CompressionMethod CompressionMethod - { - get => (CompressionMethod) this._CompressionMethod; - set - { - if (value == (CompressionMethod) this._CompressionMethod) - return; - this._CompressionMethod = value == CompressionMethod.None || value == CompressionMethod.Deflate || value == CompressionMethod.BZip2 ? (short) value : throw new InvalidOperationException("Unsupported compression method."); - if (this._CompressionMethod == (short) 0) - this._CompressionLevel = CompressionLevel.None; - else if (this.CompressionLevel == CompressionLevel.None) - this._CompressionLevel = CompressionLevel.Default; - if (this._container.ZipFile != null) - this._container.ZipFile.NotifyEntryChanged(); - this._restreamRequiredOnSave = true; - } - } - - public CompressionLevel CompressionLevel - { - get => this._CompressionLevel; - set - { - if (this._CompressionMethod != (short) 8 && this._CompressionMethod != (short) 0 || value == CompressionLevel.Default && this._CompressionMethod == (short) 8) - return; - this._CompressionLevel = value; - if (value == CompressionLevel.None && this._CompressionMethod == (short) 0) - return; - this._CompressionMethod = this._CompressionLevel != CompressionLevel.None ? (short) 8 : (short) 0; - if (this._container.ZipFile != null) - this._container.ZipFile.NotifyEntryChanged(); - this._restreamRequiredOnSave = true; - } - } - - public long CompressedSize => this._CompressedSize; - - public long UncompressedSize => this._UncompressedSize; - - public double CompressionRatio => this.UncompressedSize == 0L ? 0.0 : 100.0 * (1.0 - 1.0 * (double) this.CompressedSize / (1.0 * (double) this.UncompressedSize)); - - public int Crc => this._Crc32; - - public bool IsDirectory => this._IsDirectory; - - public bool UsesEncryption => this._Encryption_FromZipFile != EncryptionAlgorithm.None; - - public EncryptionAlgorithm Encryption - { - get => this._Encryption; - set - { - if (value == this._Encryption) - return; - this._Encryption = value != EncryptionAlgorithm.Unsupported ? value : throw new InvalidOperationException("You may not set Encryption to that value."); - this._restreamRequiredOnSave = true; - if (this._container.ZipFile == null) - return; - this._container.ZipFile.NotifyEntryChanged(); - } - } - - public string Password - { - set - { - this._Password = value; - if (this._Password == null) - { - this._Encryption = EncryptionAlgorithm.None; - } - else - { - if (this._Source == ZipEntrySource.ZipFile && !this._sourceIsEncrypted) - this._restreamRequiredOnSave = true; - if (this.Encryption != EncryptionAlgorithm.None) - return; - this._Encryption = EncryptionAlgorithm.PkzipWeak; - } - } - private get => this._Password; - } - - internal bool IsChanged => this._restreamRequiredOnSave | this._metadataChanged; - - public ExtractExistingFileAction ExtractExistingFile - { - get => this.\u003CExtractExistingFile\u003Ek__BackingField; - set => this.\u003CExtractExistingFile\u003Ek__BackingField = value; - } - - public ZipErrorAction ZipErrorAction - { - get => this.\u003CZipErrorAction\u003Ek__BackingField; - set => this.\u003CZipErrorAction\u003Ek__BackingField = value; - } - - public bool IncludedInMostRecentSave => !this._skippedDuringSave; - - public SetCompressionCallback SetCompression - { - get => this.\u003CSetCompression\u003Ek__BackingField; - set => this.\u003CSetCompression\u003Ek__BackingField = value; - } - - [Obsolete("Beginning with v1.9.1.6 of DotNetZip, this property is obsolete. It will be removed in a future version of the library. Your applications should use AlternateEncoding and AlternateEncodingUsage instead.")] - public bool UseUnicodeAsNecessary - { - get => this.AlternateEncoding == Encoding.GetEncoding("UTF-8") && this.AlternateEncodingUsage == ZipOption.AsNecessary; - set - { - if (value) - { - this.AlternateEncoding = Encoding.GetEncoding("UTF-8"); - this.AlternateEncodingUsage = ZipOption.AsNecessary; - } - else - { - this.AlternateEncoding = ZipFile.DefaultEncoding; - this.AlternateEncodingUsage = ZipOption.Default; - } - } - } - - [Obsolete("This property is obsolete since v1.9.1.6. Use AlternateEncoding and AlternateEncodingUsage instead.", true)] - public Encoding ProvisionalAlternateEncoding - { - get => this.\u003CProvisionalAlternateEncoding\u003Ek__BackingField; - set => this.\u003CProvisionalAlternateEncoding\u003Ek__BackingField = value; - } - - public Encoding AlternateEncoding - { - get => this.\u003CAlternateEncoding\u003Ek__BackingField; - set => this.\u003CAlternateEncoding\u003Ek__BackingField = value; - } - - public ZipOption AlternateEncodingUsage - { - get => this.\u003CAlternateEncodingUsage\u003Ek__BackingField; - set => this.\u003CAlternateEncodingUsage\u003Ek__BackingField = value; - } - - internal static string NameInArchive(string filename, string directoryPathInArchive) => SharedUtilities.NormalizePathForUseInZipFile(directoryPathInArchive != null ? (!string.IsNullOrEmpty(directoryPathInArchive) ? Path.Combine(directoryPathInArchive, Path.GetFileName(filename)) : Path.GetFileName(filename)) : filename); - - internal static ZipEntry CreateFromNothing(string nameInArchive) => ZipEntry.Create(nameInArchive, ZipEntrySource.None, (object) null, (object) null); - - internal static ZipEntry CreateFromFile(string filename, string nameInArchive) => ZipEntry.Create(nameInArchive, ZipEntrySource.FileSystem, (object) filename, (object) null); - - internal static ZipEntry CreateForStream(string entryName, Stream s) => ZipEntry.Create(entryName, ZipEntrySource.Stream, (object) s, (object) null); - - internal static ZipEntry CreateForWriter(string entryName, WriteDelegate d) => ZipEntry.Create(entryName, ZipEntrySource.WriteDelegate, (object) d, (object) null); - - internal static ZipEntry CreateForJitStreamProvider( - string nameInArchive, - OpenDelegate opener, - CloseDelegate closer) - { - return ZipEntry.Create(nameInArchive, ZipEntrySource.JitStream, (object) opener, (object) closer); - } - - internal static ZipEntry CreateForZipOutputStream(string nameInArchive) => ZipEntry.Create(nameInArchive, ZipEntrySource.ZipOutputStream, (object) null, (object) null); - - private static ZipEntry Create( - string nameInArchive, - ZipEntrySource source, - object arg1, - object arg2) - { - if (string.IsNullOrEmpty(nameInArchive)) - throw new ZipException("The entry name must be non-null and non-empty."); - ZipEntry zipEntry = new ZipEntry() - { - _VersionMadeBy = 45, - _Source = source - }; - zipEntry._Mtime = zipEntry._Atime = zipEntry._Ctime = DateTime.UtcNow; - switch (source) - { - case ZipEntrySource.None: - zipEntry._Source = ZipEntrySource.FileSystem; - goto case ZipEntrySource.ZipOutputStream; - case ZipEntrySource.Stream: - zipEntry._sourceStream = arg1 as Stream; - goto case ZipEntrySource.ZipOutputStream; - case ZipEntrySource.WriteDelegate: - zipEntry._WriteDelegate = arg1 as WriteDelegate; - goto case ZipEntrySource.ZipOutputStream; - case ZipEntrySource.JitStream: - zipEntry._OpenDelegate = arg1 as OpenDelegate; - zipEntry._CloseDelegate = arg2 as CloseDelegate; - goto case ZipEntrySource.ZipOutputStream; - case ZipEntrySource.ZipOutputStream: - zipEntry._LastModified = zipEntry._Mtime; - zipEntry._FileNameInArchive = SharedUtilities.NormalizePathForUseInZipFile(nameInArchive); - return zipEntry; - default: - string str = arg1 as string; - if (string.IsNullOrEmpty(str)) - throw new ZipException("The filename must be non-null and non-empty."); - try - { - zipEntry._Mtime = File.GetLastWriteTime(str).ToUniversalTime(); - zipEntry._Ctime = File.GetCreationTime(str).ToUniversalTime(); - zipEntry._Atime = File.GetLastAccessTime(str).ToUniversalTime(); - if (File.Exists(str) || Directory.Exists(str)) - zipEntry._ExternalFileAttrs = (int) NetCfFile.GetAttributes(str); - zipEntry._ntfsTimesAreSet = true; - zipEntry._LocalFileName = Path.GetFullPath(str); - goto case ZipEntrySource.ZipOutputStream; - } - catch (PathTooLongException ex) - { - throw new ZipException(string.Format("The path is too long, filename={0}", (object) str), (Exception) ex); - } - } - } - - internal void MarkAsDirectory() - { - this._IsDirectory = true; - if (this._FileNameInArchive.EndsWith("/")) - return; - this._FileNameInArchive += "/"; - } - - public bool IsText - { - get => this._IsText; - set => this._IsText = value; - } - - public override string ToString() => string.Format("ZipEntry::{0}", (object) this.FileName); - - internal Stream ArchiveStream - { - get - { - if (this._archiveStream == null) - { - if (this._container.ZipFile != null) - { - ZipFile zipFile = this._container.ZipFile; - zipFile.Reset(false); - this._archiveStream = zipFile.StreamForDiskNumber(this._diskNumber); - } - else - this._archiveStream = this._container.ZipOutputStream.OutputStream; - } - return this._archiveStream; - } - } - - private void SetFdpLoh() - { - long position = this.ArchiveStream.Position; - try - { - this.ArchiveStream.Seek(this._RelativeOffsetOfLocalHeader, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - } - catch (IOException ex) - { - throw new BadStateException(string.Format("Exception seeking entry({0}) offset(0x{1:X8}) len(0x{2:X8})", (object) this.FileName, (object) this._RelativeOffsetOfLocalHeader, (object) this.ArchiveStream.Length), (Exception) ex); - } - byte[] buffer = new byte[30]; - this.ArchiveStream.Read(buffer, 0, buffer.Length); - short num1 = (short) ((int) buffer[26] + (int) buffer[27] * 256); - short num2 = (short) ((int) buffer[28] + (int) buffer[29] * 256); - this.ArchiveStream.Seek((long) ((int) num1 + (int) num2), SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - this._LengthOfHeader = 30 + (int) num2 + (int) num1 + ZipEntry.GetLengthOfCryptoHeaderBytes(this._Encryption_FromZipFile); - this.__FileDataPosition = this._RelativeOffsetOfLocalHeader + (long) this._LengthOfHeader; - this.ArchiveStream.Seek(position, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - } - - internal static int GetLengthOfCryptoHeaderBytes(EncryptionAlgorithm a) - { - if (a == EncryptionAlgorithm.None) - return 0; - if (a == EncryptionAlgorithm.PkzipWeak) - return 12; - throw new ZipException("internal error"); - } - - internal long FileDataPosition - { - get - { - if (this.__FileDataPosition == -1L) - this.SetFdpLoh(); - return this.__FileDataPosition; - } - } - - private int LengthOfHeader - { - get - { - if (this._LengthOfHeader == 0) - this.SetFdpLoh(); - return this._LengthOfHeader; - } - } - - public void Extract() => this.InternalExtract(".", (Stream) null, (string) null); - - public void Extract(ExtractExistingFileAction extractExistingFile) - { - this.ExtractExistingFile = extractExistingFile; - this.InternalExtract(".", (Stream) null, (string) null); - } - - public void Extract(Stream stream) => this.InternalExtract((string) null, stream, (string) null); - - public void Extract(string baseDirectory) => this.InternalExtract(baseDirectory, (Stream) null, (string) null); - - public void Extract(string baseDirectory, ExtractExistingFileAction extractExistingFile) - { - this.ExtractExistingFile = extractExistingFile; - this.InternalExtract(baseDirectory, (Stream) null, (string) null); - } - - public void ExtractWithPassword(string password) => this.InternalExtract(".", (Stream) null, password); - - public void ExtractWithPassword(string baseDirectory, string password) => this.InternalExtract(baseDirectory, (Stream) null, password); - - public void ExtractWithPassword(ExtractExistingFileAction extractExistingFile, string password) - { - this.ExtractExistingFile = extractExistingFile; - this.InternalExtract(".", (Stream) null, password); - } - - public void ExtractWithPassword( - string baseDirectory, - ExtractExistingFileAction extractExistingFile, - string password) - { - this.ExtractExistingFile = extractExistingFile; - this.InternalExtract(baseDirectory, (Stream) null, password); - } - - public void ExtractWithPassword(Stream stream, string password) => this.InternalExtract((string) null, stream, password); - - public CrcCalculatorStream OpenReader() - { - if (this._container.ZipFile == null) - throw new InvalidOperationException("Use OpenReader() only with ZipFile."); - return this.InternalOpenReader(this._Password ?? this._container.Password); - } - - public CrcCalculatorStream OpenReader(string password) - { - if (this._container.ZipFile == null) - throw new InvalidOperationException("Use OpenReader() only with ZipFile."); - return this.InternalOpenReader(password); - } - - internal CrcCalculatorStream InternalOpenReader(string password) - { - this.ValidateCompression(); - this.ValidateEncryption(); - this.SetupCryptoForExtract(password); - if (this._Source != ZipEntrySource.ZipFile) - throw new BadStateException("You must call ZipFile.Save before calling OpenReader"); - long length = this._CompressionMethod_FromZipFile == (short) 0 ? this._CompressedFileDataSize : this.UncompressedSize; - Stream archiveStream = this.ArchiveStream; - this.ArchiveStream.Seek(this.FileDataPosition, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - this._inputDecryptorStream = this.GetExtractDecryptor(archiveStream); - return new CrcCalculatorStream(this.GetExtractDecompressor(this._inputDecryptorStream), length); - } - - private void OnExtractProgress(long bytesWritten, long totalBytesToWrite) - { - if (this._container.ZipFile == null) - return; - this._ioOperationCanceled = this._container.ZipFile.OnExtractBlock(this, bytesWritten, totalBytesToWrite); - } - - private void OnBeforeExtract(string path) - { - if (this._container.ZipFile == null || this._container.ZipFile._inExtractAll) - return; - this._ioOperationCanceled = this._container.ZipFile.OnSingleEntryExtract(this, path, true); - } - - private void OnAfterExtract(string path) - { - if (this._container.ZipFile == null || this._container.ZipFile._inExtractAll) - return; - this._container.ZipFile.OnSingleEntryExtract(this, path, false); - } - - private void OnExtractExisting(string path) - { - if (this._container.ZipFile == null) - return; - this._ioOperationCanceled = this._container.ZipFile.OnExtractExisting(this, path); - } - - private static void ReallyDelete(string fileName) - { - if (((int) NetCfFile.GetAttributes(fileName) & 1) == 1) - NetCfFile.SetAttributes(fileName, 128U); - File.Delete(fileName); - } - - private void WriteStatus(string format, params object[] args) - { - if (this._container.ZipFile == null || !this._container.ZipFile.Verbose) - return; - this._container.ZipFile.StatusMessageTextWriter.WriteLine(format, args); - } - - private void InternalExtract(string baseDir, Stream outstream, string password) - { - if (this._container == null) - throw new BadStateException("This entry is an orphan"); - if (this._container.ZipFile == null) - throw new InvalidOperationException("Use Extract() only with ZipFile."); - this._container.ZipFile.Reset(false); - if (this._Source != ZipEntrySource.ZipFile) - throw new BadStateException("You must call ZipFile.Save before calling any Extract method"); - this.OnBeforeExtract(baseDir); - this._ioOperationCanceled = false; - string outFileName = (string) null; - Stream output = (Stream) null; - bool flag1 = false; - bool flag2 = false; - try - { - this.ValidateCompression(); - this.ValidateEncryption(); - if (this.ValidateOutput(baseDir, outstream, out outFileName)) - { - this.WriteStatus("extract dir {0}...", (object) outFileName); - this.OnAfterExtract(baseDir); - } - else - { - if (outFileName != null && File.Exists(outFileName)) - { - flag1 = true; - switch (this.CheckExtractExistingFile(baseDir, outFileName)) - { - case 1: - return; - case 2: - return; - } - } - string password1 = password ?? this._Password ?? this._container.Password; - if (this._Encryption_FromZipFile != EncryptionAlgorithm.None) - { - if (password1 == null) - throw new BadPasswordException(); - this.SetupCryptoForExtract(password1); - } - if (outFileName != null) - { - this.WriteStatus("extract file {0}...", (object) outFileName); - outFileName += ".tmp"; - string directoryName = Path.GetDirectoryName(outFileName); - if (!Directory.Exists(directoryName)) - Directory.CreateDirectory(directoryName); - else if (this._container.ZipFile != null) - flag2 = this._container.ZipFile._inExtractAll; - output = (Stream) new FileStream(outFileName, FileMode.CreateNew); - } - else - { - this.WriteStatus("extract entry {0} to stream...", (object) this.FileName); - output = outstream; - } - if (this._ioOperationCanceled) - return; - int one = this.ExtractOne(output); - if (this._ioOperationCanceled) - return; - this.VerifyCrcAfterExtract(one); - if (outFileName != null) - { - output.Close(); - output = (Stream) null; - string sourceFileName = outFileName; - string str = (string) null; - outFileName = sourceFileName.Substring(0, sourceFileName.Length - 4); - if (flag1) - { - str = outFileName + ".PendingOverwrite"; - File.Move(outFileName, str); - } - File.Move(sourceFileName, outFileName); - this._SetTimes(outFileName, true); - if (str != null && File.Exists(str)) - ZipEntry.ReallyDelete(str); - if (flag2 && this.FileName.IndexOf('/') != -1 && this._container.ZipFile[Path.GetDirectoryName(this.FileName)] == null) - this._SetTimes(Path.GetDirectoryName(outFileName), false); - if (((int) this._VersionMadeBy & 65280) == 2560 || ((int) this._VersionMadeBy & 65280) == 0) - NetCfFile.SetAttributes(outFileName, (uint) this._ExternalFileAttrs); - } - this.OnAfterExtract(baseDir); - } - } - catch (Exception ex) - { - this._ioOperationCanceled = true; - throw; - } - finally - { - if (this._ioOperationCanceled && outFileName != null) - { - output?.Close(); - if (File.Exists(outFileName) && !flag1) - File.Delete(outFileName); - } - } - } - - internal void VerifyCrcAfterExtract(int actualCrc32) - { - if (actualCrc32 != this._Crc32) - throw new BadCrcException("CRC error: the file being extracted appears to be corrupted. " + string.Format("Expected 0x{0:X8}, Actual 0x{1:X8}", (object) this._Crc32, (object) actualCrc32)); - } - - private int CheckExtractExistingFile(string baseDir, string targetFileName) - { - int num = 0; - while (true) - { - switch (this.ExtractExistingFile) - { - case ExtractExistingFileAction.OverwriteSilently: - goto label_2; - case ExtractExistingFileAction.DoNotOverwrite: - goto label_3; - case ExtractExistingFileAction.InvokeExtractProgressEvent: - if (num <= 0) - { - this.OnExtractExisting(baseDir); - if (!this._ioOperationCanceled) - { - ++num; - continue; - } - goto label_7; - } - else - goto label_5; - default: - goto label_8; - } - } -label_2: - this.WriteStatus("the file {0} exists; will overwrite it...", (object) targetFileName); - return 0; -label_3: - this.WriteStatus("the file {0} exists; not extracting entry...", (object) this.FileName); - this.OnAfterExtract(baseDir); - return 1; -label_5: - throw new ZipException(string.Format("The file {0} already exists.", (object) targetFileName)); -label_7: - return 2; -label_8: - throw new ZipException(string.Format("The file {0} already exists.", (object) targetFileName)); - } - - private void _CheckRead(int nbytes) - { - if (nbytes == 0) - throw new BadReadException(string.Format("bad read of entry {0} from compressed archive.", (object) this.FileName)); - } - - private int ExtractOne(Stream output) - { - Stream archiveStream = this.ArchiveStream; - try - { - archiveStream.Seek(this.FileDataPosition, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(archiveStream); - byte[] buffer = new byte[this.BufferSize]; - long num1 = this._CompressionMethod_FromZipFile != (short) 0 ? this.UncompressedSize : this._CompressedFileDataSize; - this._inputDecryptorStream = this.GetExtractDecryptor(archiveStream); - Stream extractDecompressor = this.GetExtractDecompressor(this._inputDecryptorStream); - long bytesWritten = 0; - using (CrcCalculatorStream calculatorStream = new CrcCalculatorStream(extractDecompressor)) - { - while (num1 > 0L) - { - int count = num1 > (long) buffer.Length ? buffer.Length : (int) num1; - int num2 = calculatorStream.Read(buffer, 0, count); - this._CheckRead(num2); - output.Write(buffer, 0, num2); - num1 -= (long) num2; - bytesWritten += (long) num2; - this.OnExtractProgress(bytesWritten, this.UncompressedSize); - if (this._ioOperationCanceled) - break; - } - return calculatorStream.Crc; - } - } - finally - { - if (archiveStream is ZipSegmentedStream zipSegmentedStream) - { - zipSegmentedStream.Close(); - this._archiveStream = (Stream) null; - } - } - } - - internal Stream GetExtractDecompressor(Stream input2) - { - switch (this._CompressionMethod_FromZipFile) - { - case 0: - return input2; - case 8: - return (Stream) new DeflateStream(input2, CompressionMode.Decompress, true); - case 12: - return (Stream) new BZip2InputStream(input2, true); - default: - return (Stream) null; - } - } - - internal Stream GetExtractDecryptor(Stream input) => this._Encryption_FromZipFile != EncryptionAlgorithm.PkzipWeak ? input : (Stream) new ZipCipherStream(input, this._zipCrypto_forExtract, CryptoMode.Decrypt); - - internal void _SetTimes(string fileOrDirectory, bool isFile) - { - try - { - if (this._ntfsTimesAreSet) - { - int num = NetCfFile.SetTimes(fileOrDirectory, this._Ctime, this._Atime, this._Mtime); - if (num == 0) - return; - this.WriteStatus("Warning: SetTimes failed. entry({0}) file({1}) rc({2})", (object) this.FileName, (object) fileOrDirectory, (object) num); - } - else - { - DateTime mtime = SharedUtilities.AdjustTime_Reverse(this.LastModified); - int num = NetCfFile.SetLastWriteTime(fileOrDirectory, mtime); - if (num == 0) - return; - this.WriteStatus("Warning: SetLastWriteTime failed. entry({0}) file({1}) rc({2})", (object) this.FileName, (object) fileOrDirectory, (object) num); - } - } - catch (IOException ex) - { - this.WriteStatus("failed to set time on {0}: {1}", (object) fileOrDirectory, (object) ex.Message); - } - } - - private string UnsupportedAlgorithm - { - get - { - string empty = string.Empty; - string unsupportedAlgorithm; - switch (this._UnsupportedAlgorithmId) - { - case 0: - unsupportedAlgorithm = "--"; - break; - case 26113: - unsupportedAlgorithm = "DES"; - break; - case 26114: - unsupportedAlgorithm = "RC2"; - break; - case 26115: - unsupportedAlgorithm = "3DES-168"; - break; - case 26121: - unsupportedAlgorithm = "3DES-112"; - break; - case 26126: - unsupportedAlgorithm = "PKWare AES128"; - break; - case 26127: - unsupportedAlgorithm = "PKWare AES192"; - break; - case 26128: - unsupportedAlgorithm = "PKWare AES256"; - break; - case 26370: - unsupportedAlgorithm = "RC2"; - break; - case 26400: - unsupportedAlgorithm = "Blowfish"; - break; - case 26401: - unsupportedAlgorithm = "Twofish"; - break; - case 26625: - unsupportedAlgorithm = "RC4"; - break; - default: - unsupportedAlgorithm = string.Format("Unknown (0x{0:X4})", (object) this._UnsupportedAlgorithmId); - break; - } - return unsupportedAlgorithm; - } - } - - private string UnsupportedCompressionMethod - { - get - { - string empty = string.Empty; - string compressionMethod; - switch (this._CompressionMethod) - { - case 0: - compressionMethod = "Store"; - break; - case 1: - compressionMethod = "Shrink"; - break; - case 8: - compressionMethod = "DEFLATE"; - break; - case 9: - compressionMethod = "Deflate64"; - break; - case 12: - compressionMethod = "BZIP2"; - break; - case 14: - compressionMethod = "LZMA"; - break; - case 19: - compressionMethod = "LZ77"; - break; - case 98: - compressionMethod = "PPMd"; - break; - default: - compressionMethod = string.Format("Unknown (0x{0:X4})", (object) this._CompressionMethod); - break; - } - return compressionMethod; - } - } - - internal void ValidateEncryption() - { - if (this.Encryption == EncryptionAlgorithm.PkzipWeak || this.Encryption == EncryptionAlgorithm.None) - return; - if (this._UnsupportedAlgorithmId != 0U) - throw new ZipException(string.Format("Cannot extract: Entry {0} is encrypted with an algorithm not supported by DotNetZip: {1}", (object) this.FileName, (object) this.UnsupportedAlgorithm)); - throw new ZipException(string.Format("Cannot extract: Entry {0} uses an unsupported encryption algorithm ({1:X2})", (object) this.FileName, (object) (int) this.Encryption)); - } - - private void ValidateCompression() - { - if (this._CompressionMethod_FromZipFile != (short) 0 && this._CompressionMethod_FromZipFile != (short) 8 && this._CompressionMethod_FromZipFile != (short) 12) - throw new ZipException(string.Format("Entry {0} uses an unsupported compression method (0x{1:X2}, {2})", (object) this.FileName, (object) this._CompressionMethod_FromZipFile, (object) this.UnsupportedCompressionMethod)); - } - - private void SetupCryptoForExtract(string password) - { - if (this._Encryption_FromZipFile == EncryptionAlgorithm.None || this._Encryption_FromZipFile != EncryptionAlgorithm.PkzipWeak) - return; - if (password == null) - throw new ZipException("Missing password."); - this.ArchiveStream.Seek(this.FileDataPosition - 12L, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - this._zipCrypto_forExtract = ZipCrypto.ForRead(password, this); - } - - private bool ValidateOutput(string basedir, Stream outstream, out string outFileName) - { - if (basedir != null) - { - string str = this.FileName.Replace("\\", "/"); - if (str.IndexOf(':') == 1) - str = str.Substring(2); - if (str.StartsWith("/")) - str = str.Substring(1); - outFileName = !this._container.ZipFile.FlattenFoldersOnExtract ? Path.Combine(basedir, str) : Path.Combine(basedir, str.IndexOf('/') != -1 ? Path.GetFileName(str) : str); - outFileName = outFileName.Replace("/", "\\"); - if (!this.IsDirectory && !this.FileName.EndsWith("/")) - return false; - if (!Directory.Exists(outFileName)) - { - Directory.CreateDirectory(outFileName); - this._SetTimes(outFileName, false); - } - else if (this.ExtractExistingFile == ExtractExistingFileAction.OverwriteSilently) - this._SetTimes(outFileName, false); - return true; - } - if (outstream == null) - throw new ArgumentNullException(nameof (outstream)); - outFileName = (string) null; - return this.IsDirectory || this.FileName.EndsWith("/"); - } - - private void ReadExtraField() - { - ++this._readExtraDepth; - long position = this.ArchiveStream.Position; - this.ArchiveStream.Seek(this._RelativeOffsetOfLocalHeader, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - byte[] buffer = new byte[30]; - this.ArchiveStream.Read(buffer, 0, buffer.Length); - int num1 = 26; - byte[] numArray1 = buffer; - int index1 = num1; - int num2 = index1 + 1; - int num3 = (int) numArray1[index1]; - byte[] numArray2 = buffer; - int index2 = num2; - int num4 = index2 + 1; - int num5 = (int) numArray2[index2] * 256; - short offset = (short) (num3 + num5); - byte[] numArray3 = buffer; - int index3 = num4; - int num6 = index3 + 1; - int num7 = (int) numArray3[index3]; - byte[] numArray4 = buffer; - int index4 = num6; - int num8 = index4 + 1; - int num9 = (int) numArray4[index4] * 256; - short extraFieldLength = (short) (num7 + num9); - this.ArchiveStream.Seek((long) offset, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - this.ProcessExtraField(this.ArchiveStream, extraFieldLength); - this.ArchiveStream.Seek(position, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this.ArchiveStream); - --this._readExtraDepth; - } - - private static bool ReadHeader(ZipEntry ze, Encoding defaultEncoding) - { - int num1 = 0; - ze._RelativeOffsetOfLocalHeader = ze.ArchiveStream.Position; - int signature1 = SharedUtilities.ReadEntrySignature(ze.ArchiveStream); - int num2 = num1 + 4; - if (ZipEntry.IsNotValidSig(signature1)) - { - ze.ArchiveStream.Seek(-4L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(ze.ArchiveStream); - if (ZipEntry.IsNotValidZipDirEntrySig(signature1) && signature1 != 101010256) - throw new BadReadException(string.Format(" Bad signature (0x{0:X8}) at position 0x{1:X8}", (object) signature1, (object) ze.ArchiveStream.Position)); - return false; - } - byte[] buffer1 = new byte[26]; - int num3 = ze.ArchiveStream.Read(buffer1, 0, buffer1.Length); - if (num3 != buffer1.Length) - return false; - int num4 = num2 + num3; - int num5 = 0; - ZipEntry zipEntry1 = ze; - byte[] numArray1 = buffer1; - int index1 = num5; - int num6 = index1 + 1; - int num7 = (int) numArray1[index1]; - byte[] numArray2 = buffer1; - int index2 = num6; - int num8 = index2 + 1; - int num9 = (int) numArray2[index2] * 256; - int num10 = (int) (short) (num7 + num9); - zipEntry1._VersionNeeded = (short) num10; - ZipEntry zipEntry2 = ze; - byte[] numArray3 = buffer1; - int index3 = num8; - int num11 = index3 + 1; - int num12 = (int) numArray3[index3]; - byte[] numArray4 = buffer1; - int index4 = num11; - int num13 = index4 + 1; - int num14 = (int) numArray4[index4] * 256; - int num15 = (int) (short) (num12 + num14); - zipEntry2._BitField = (short) num15; - ZipEntry zipEntry3 = ze; - ZipEntry zipEntry4 = ze; - byte[] numArray5 = buffer1; - int index5 = num13; - int num16 = index5 + 1; - int num17 = (int) numArray5[index5]; - byte[] numArray6 = buffer1; - int index6 = num16; - int num18 = index6 + 1; - int num19 = (int) numArray6[index6] * 256; - int num20; - short num21 = (short) (num20 = (int) (short) (num17 + num19)); - zipEntry4._CompressionMethod = (short) num20; - int num22 = (int) num21; - zipEntry3._CompressionMethod_FromZipFile = (short) num22; - ZipEntry zipEntry5 = ze; - byte[] numArray7 = buffer1; - int index7 = num18; - int num23 = index7 + 1; - int num24 = (int) numArray7[index7]; - byte[] numArray8 = buffer1; - int index8 = num23; - int num25 = index8 + 1; - int num26 = (int) numArray8[index8] * 256; - int num27 = num24 + num26; - byte[] numArray9 = buffer1; - int index9 = num25; - int num28 = index9 + 1; - int num29 = (int) numArray9[index9] * 256 * 256; - int num30 = num27 + num29; - byte[] numArray10 = buffer1; - int index10 = num28; - int num31 = index10 + 1; - int num32 = (int) numArray10[index10] * 256 * 256 * 256; - int num33 = num30 + num32; - zipEntry5._TimeBlob = num33; - ze._LastModified = SharedUtilities.PackedToDateTime(ze._TimeBlob); - ze._timestamp |= ZipEntryTimestamp.DOS; - if (((int) ze._BitField & 1) == 1) - { - ze._Encryption_FromZipFile = ze._Encryption = EncryptionAlgorithm.PkzipWeak; - ze._sourceIsEncrypted = true; - } - ZipEntry zipEntry6 = ze; - byte[] numArray11 = buffer1; - int index11 = num31; - int num34 = index11 + 1; - int num35 = (int) numArray11[index11]; - byte[] numArray12 = buffer1; - int index12 = num34; - int num36 = index12 + 1; - int num37 = (int) numArray12[index12] * 256; - int num38 = num35 + num37; - byte[] numArray13 = buffer1; - int index13 = num36; - int num39 = index13 + 1; - int num40 = (int) numArray13[index13] * 256 * 256; - int num41 = num38 + num40; - byte[] numArray14 = buffer1; - int index14 = num39; - int num42 = index14 + 1; - int num43 = (int) numArray14[index14] * 256 * 256 * 256; - int num44 = num41 + num43; - zipEntry6._Crc32 = num44; - ZipEntry zipEntry7 = ze; - byte[] numArray15 = buffer1; - int index15 = num42; - int num45 = index15 + 1; - int num46 = (int) numArray15[index15]; - byte[] numArray16 = buffer1; - int index16 = num45; - int num47 = index16 + 1; - int num48 = (int) numArray16[index16] * 256; - int num49 = num46 + num48; - byte[] numArray17 = buffer1; - int index17 = num47; - int num50 = index17 + 1; - int num51 = (int) numArray17[index17] * 256 * 256; - int num52 = num49 + num51; - byte[] numArray18 = buffer1; - int index18 = num50; - int num53 = index18 + 1; - int num54 = (int) numArray18[index18] * 256 * 256 * 256; - long num55 = (long) (uint) (num52 + num54); - zipEntry7._CompressedSize = num55; - ZipEntry zipEntry8 = ze; - byte[] numArray19 = buffer1; - int index19 = num53; - int num56 = index19 + 1; - int num57 = (int) numArray19[index19]; - byte[] numArray20 = buffer1; - int index20 = num56; - int num58 = index20 + 1; - int num59 = (int) numArray20[index20] * 256; - int num60 = num57 + num59; - byte[] numArray21 = buffer1; - int index21 = num58; - int num61 = index21 + 1; - int num62 = (int) numArray21[index21] * 256 * 256; - int num63 = num60 + num62; - byte[] numArray22 = buffer1; - int index22 = num61; - int num64 = index22 + 1; - int num65 = (int) numArray22[index22] * 256 * 256 * 256; - long num66 = (long) (uint) (num63 + num65); - zipEntry8._UncompressedSize = num66; - if ((uint) ze._CompressedSize == uint.MaxValue || (uint) ze._UncompressedSize == uint.MaxValue) - ze._InputUsesZip64 = true; - byte[] numArray23 = buffer1; - int index23 = num64; - int num67 = index23 + 1; - int num68 = (int) numArray23[index23]; - byte[] numArray24 = buffer1; - int index24 = num67; - int num69 = index24 + 1; - int num70 = (int) numArray24[index24] * 256; - short length = (short) (num68 + num70); - byte[] numArray25 = buffer1; - int index25 = num69; - int num71 = index25 + 1; - int num72 = (int) numArray25[index25]; - byte[] numArray26 = buffer1; - int index26 = num71; - int num73 = index26 + 1; - int num74 = (int) numArray26[index26] * 256; - short extraFieldLength = (short) (num72 + num74); - byte[] numArray27 = new byte[(int) length]; - int num75 = ze.ArchiveStream.Read(numArray27, 0, numArray27.Length); - int num76 = num4 + num75; - if (((int) ze._BitField & 2048) == 2048) - { - ze.AlternateEncoding = Encoding.UTF8; - ze.AlternateEncodingUsage = ZipOption.Always; - } - ze._FileNameInArchive = ze.AlternateEncoding.GetString(numArray27, 0, numArray27.Length); - if (ze._FileNameInArchive.EndsWith("/")) - ze.MarkAsDirectory(); - int num77 = num76 + ze.ProcessExtraField(ze.ArchiveStream, extraFieldLength); - ze._LengthOfTrailer = 0; - if (!ze._FileNameInArchive.EndsWith("/") && ((int) ze._BitField & 8) == 8) - { - long position = ze.ArchiveStream.Position; - bool flag = true; - long num78 = 0; - int num79 = 0; - while (flag) - { - ++num79; - if (ze._container.ZipFile != null) - ze._container.ZipFile.OnReadBytes(ze); - long signature2 = SharedUtilities.FindSignature(ze.ArchiveStream, 134695760); - if (signature2 == -1L) - return false; - num78 += signature2; - if (ze._InputUsesZip64) - { - byte[] buffer2 = new byte[20]; - if (ze.ArchiveStream.Read(buffer2, 0, buffer2.Length) != 20) - return false; - int num80 = 0; - ZipEntry zipEntry9 = ze; - byte[] numArray28 = buffer2; - int index27 = num80; - int num81 = index27 + 1; - int num82 = (int) numArray28[index27]; - byte[] numArray29 = buffer2; - int index28 = num81; - int num83 = index28 + 1; - int num84 = (int) numArray29[index28] * 256; - int num85 = num82 + num84; - byte[] numArray30 = buffer2; - int index29 = num83; - int num86 = index29 + 1; - int num87 = (int) numArray30[index29] * 256 * 256; - int num88 = num85 + num87; - byte[] numArray31 = buffer2; - int index30 = num86; - int startIndex1 = index30 + 1; - int num89 = (int) numArray31[index30] * 256 * 256 * 256; - int num90 = num88 + num89; - zipEntry9._Crc32 = num90; - ze._CompressedSize = BitConverter.ToInt64(buffer2, startIndex1); - int startIndex2 = startIndex1 + 8; - ze._UncompressedSize = BitConverter.ToInt64(buffer2, startIndex2); - num73 = startIndex2 + 8; - ze._LengthOfTrailer += 24; - } - else - { - byte[] buffer3 = new byte[12]; - if (ze.ArchiveStream.Read(buffer3, 0, buffer3.Length) != 12) - return false; - int num91 = 0; - ZipEntry zipEntry10 = ze; - byte[] numArray32 = buffer3; - int index31 = num91; - int num92 = index31 + 1; - int num93 = (int) numArray32[index31]; - byte[] numArray33 = buffer3; - int index32 = num92; - int num94 = index32 + 1; - int num95 = (int) numArray33[index32] * 256; - int num96 = num93 + num95; - byte[] numArray34 = buffer3; - int index33 = num94; - int num97 = index33 + 1; - int num98 = (int) numArray34[index33] * 256 * 256; - int num99 = num96 + num98; - byte[] numArray35 = buffer3; - int index34 = num97; - int num100 = index34 + 1; - int num101 = (int) numArray35[index34] * 256 * 256 * 256; - int num102 = num99 + num101; - zipEntry10._Crc32 = num102; - ZipEntry zipEntry11 = ze; - byte[] numArray36 = buffer3; - int index35 = num100; - int num103 = index35 + 1; - int num104 = (int) numArray36[index35]; - byte[] numArray37 = buffer3; - int index36 = num103; - int num105 = index36 + 1; - int num106 = (int) numArray37[index36] * 256; - int num107 = num104 + num106; - byte[] numArray38 = buffer3; - int index37 = num105; - int num108 = index37 + 1; - int num109 = (int) numArray38[index37] * 256 * 256; - int num110 = num107 + num109; - byte[] numArray39 = buffer3; - int index38 = num108; - int num111 = index38 + 1; - int num112 = (int) numArray39[index38] * 256 * 256 * 256; - long num113 = (long) (uint) (num110 + num112); - zipEntry11._CompressedSize = num113; - ZipEntry zipEntry12 = ze; - byte[] numArray40 = buffer3; - int index39 = num111; - int num114 = index39 + 1; - int num115 = (int) numArray40[index39]; - byte[] numArray41 = buffer3; - int index40 = num114; - int num116 = index40 + 1; - int num117 = (int) numArray41[index40] * 256; - int num118 = num115 + num117; - byte[] numArray42 = buffer3; - int index41 = num116; - int num119 = index41 + 1; - int num120 = (int) numArray42[index41] * 256 * 256; - int num121 = num118 + num120; - byte[] numArray43 = buffer3; - int index42 = num119; - num73 = index42 + 1; - int num122 = (int) numArray43[index42] * 256 * 256 * 256; - long num123 = (long) (uint) (num121 + num122); - zipEntry12._UncompressedSize = num123; - ze._LengthOfTrailer += 16; - } - flag = num78 != ze._CompressedSize; - if (flag) - { - ze.ArchiveStream.Seek(-12L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(ze.ArchiveStream); - num78 += 4L; - } - } - ze.ArchiveStream.Seek(position, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(ze.ArchiveStream); - } - ze._CompressedFileDataSize = ze._CompressedSize; - if (((int) ze._BitField & 1) == 1) - { - ze._WeakEncryptionHeader = new byte[12]; - num77 += ZipEntry.ReadWeakEncryptionHeader(ze._archiveStream, ze._WeakEncryptionHeader); - ze._CompressedFileDataSize -= 12L; - } - ze._LengthOfHeader = num77; - ze._TotalEntrySize = (long) ze._LengthOfHeader + ze._CompressedFileDataSize + (long) ze._LengthOfTrailer; - return true; - } - - internal static int ReadWeakEncryptionHeader(Stream s, byte[] buffer) - { - int num = s.Read(buffer, 0, 12); - return num == 12 ? num : throw new ZipException(string.Format("Unexpected end of data at position 0x{0:X8}", (object) s.Position)); - } - - private static bool IsNotValidSig(int signature) => signature != 67324752; - - internal static ZipEntry ReadEntry(ZipContainer zc, bool first) - { - ZipFile zipFile = zc.ZipFile; - Stream readStream = zc.ReadStream; - Encoding alternateEncoding = zc.AlternateEncoding; - ZipEntry zipEntry = new ZipEntry(); - zipEntry._Source = ZipEntrySource.ZipFile; - zipEntry._container = zc; - zipEntry._archiveStream = readStream; - zipFile?.OnReadEntry(true, (ZipEntry) null); - if (first) - ZipEntry.HandlePK00Prefix(readStream); - if (!ZipEntry.ReadHeader(zipEntry, alternateEncoding)) - return (ZipEntry) null; - zipEntry.__FileDataPosition = zipEntry.ArchiveStream.Position; - readStream.Seek(zipEntry._CompressedFileDataSize + (long) zipEntry._LengthOfTrailer, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(readStream); - ZipEntry.HandleUnexpectedDataDescriptor(zipEntry); - if (zipFile != null) - { - zipFile.OnReadBytes(zipEntry); - zipFile.OnReadEntry(false, zipEntry); - } - return zipEntry; - } - - internal static void HandlePK00Prefix(Stream s) - { - if (SharedUtilities.ReadInt(s) == 808471376) - return; - s.Seek(-4L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(s); - } - - private static void HandleUnexpectedDataDescriptor(ZipEntry entry) - { - Stream archiveStream = entry.ArchiveStream; - if ((long) (uint) SharedUtilities.ReadInt(archiveStream) == (long) entry._Crc32) - { - if ((long) SharedUtilities.ReadInt(archiveStream) == entry._CompressedSize) - { - if ((long) SharedUtilities.ReadInt(archiveStream) == entry._UncompressedSize) - return; - archiveStream.Seek(-12L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(archiveStream); - } - else - { - archiveStream.Seek(-8L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(archiveStream); - } - } - else - { - archiveStream.Seek(-4L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(archiveStream); - } - } - - internal static int FindExtraFieldSegment(byte[] extra, int offx, ushort targetHeaderId) - { - int num1; - short num2; - for (int index1 = offx; index1 + 3 < extra.Length; index1 = num1 + (int) num2) - { - byte[] numArray1 = extra; - int index2 = index1; - int num3 = index2 + 1; - int num4 = (int) numArray1[index2]; - byte[] numArray2 = extra; - int index3 = num3; - int num5 = index3 + 1; - int num6 = (int) numArray2[index3] * 256; - if ((int) (ushort) (num4 + num6) == (int) targetHeaderId) - return num5 - 2; - byte[] numArray3 = extra; - int index4 = num5; - int num7 = index4 + 1; - int num8 = (int) numArray3[index4]; - byte[] numArray4 = extra; - int index5 = num7; - num1 = index5 + 1; - int num9 = (int) numArray4[index5] * 256; - num2 = (short) (num8 + num9); - } - return -1; - } - - internal int ProcessExtraField(Stream s, short extraFieldLength) - { - int num1 = 0; - if (extraFieldLength > (short) 0) - { - byte[] numArray1 = this._Extra = new byte[(int) extraFieldLength]; - num1 = s.Read(numArray1, 0, numArray1.Length); - long posn = s.Position - (long) num1; - int num2; - short dataSize; - for (int index1 = 0; index1 + 3 < numArray1.Length; index1 = num2 + (int) dataSize + 4) - { - num2 = index1; - byte[] numArray2 = numArray1; - int index2 = index1; - int num3 = index2 + 1; - int num4 = (int) numArray2[index2]; - byte[] numArray3 = numArray1; - int index3 = num3; - int num5 = index3 + 1; - int num6 = (int) numArray3[index3] * 256; - ushort num7 = (ushort) (num4 + num6); - byte[] numArray4 = numArray1; - int index4 = num5; - int num8 = index4 + 1; - int num9 = (int) numArray4[index4]; - byte[] numArray5 = numArray1; - int index5 = num8; - int j = index5 + 1; - int num10 = (int) numArray5[index5] * 256; - dataSize = (short) (num9 + num10); - int num11; - switch (num7) - { - case 1: - num11 = this.ProcessExtraFieldZip64(numArray1, j, dataSize, posn); - break; - case 10: - num11 = this.ProcessExtraFieldWindowsTimes(numArray1, j, dataSize, posn); - break; - case 23: - num11 = this.ProcessExtraFieldPkwareStrongEncryption(numArray1, j); - break; - case 21589: - num11 = this.ProcessExtraFieldUnixTimes(numArray1, j, dataSize, posn); - break; - case 22613: - num11 = this.ProcessExtraFieldInfoZipTimes(numArray1, j, dataSize, posn); - break; - } - } - } - return num1; - } - - private int ProcessExtraFieldPkwareStrongEncryption(byte[] Buffer, int j) - { - j += 2; - this._UnsupportedAlgorithmId = (uint) (ushort) ((int) Buffer[j++] + (int) Buffer[j++] * 256); - this._Encryption_FromZipFile = this._Encryption = EncryptionAlgorithm.Unsupported; - return j; - } - - private int ProcessExtraFieldZip64(byte[] buffer, int j, short dataSize, long posn) - { - ZipEntry.\u003C\u003Ec__DisplayClass1 cDisplayClass1 = new ZipEntry.\u003C\u003Ec__DisplayClass1(); - cDisplayClass1.buffer = buffer; - cDisplayClass1.j = j; - cDisplayClass1.posn = posn; - this._InputUsesZip64 = true; - cDisplayClass1.remainingData = dataSize <= (short) 28 ? (int) dataSize : throw new BadReadException(string.Format(" Inconsistent size (0x{0:X4}) for ZIP64 extra field at position 0x{1:X16}", (object) dataSize, (object) cDisplayClass1.posn)); - ZipEntry.Func func = new ZipEntry.Func(cDisplayClass1.\u003CProcessExtraFieldZip64\u003Eb__0); - if (this._UncompressedSize == (long) uint.MaxValue) - this._UncompressedSize = func(); - if (this._CompressedSize == (long) uint.MaxValue) - this._CompressedSize = func(); - if (this._RelativeOffsetOfLocalHeader == (long) uint.MaxValue) - this._RelativeOffsetOfLocalHeader = func(); - return cDisplayClass1.j; - } - - private int ProcessExtraFieldInfoZipTimes(byte[] buffer, int j, short dataSize, long posn) - { - if (dataSize != (short) 12 && dataSize != (short) 8) - throw new BadReadException(string.Format(" Unexpected size (0x{0:X4}) for InfoZip v1 extra field at position 0x{1:X16}", (object) dataSize, (object) posn)); - int int32_1 = BitConverter.ToInt32(buffer, j); - this._Mtime = ZipEntry._unixEpoch.AddSeconds((double) int32_1); - j += 4; - int int32_2 = BitConverter.ToInt32(buffer, j); - this._Atime = ZipEntry._unixEpoch.AddSeconds((double) int32_2); - j += 4; - this._Ctime = DateTime.UtcNow; - this._ntfsTimesAreSet = true; - this._timestamp |= ZipEntryTimestamp.InfoZip1; - return j; - } - - private int ProcessExtraFieldUnixTimes(byte[] buffer, int j, short dataSize, long posn) - { - ZipEntry.\u003C\u003Ec__DisplayClass4 cDisplayClass4 = new ZipEntry.\u003C\u003Ec__DisplayClass4(); - cDisplayClass4.buffer = buffer; - cDisplayClass4.j = j; - cDisplayClass4.\u003C\u003E4__this = this; - cDisplayClass4.remainingData = dataSize == (short) 13 || dataSize == (short) 9 || dataSize == (short) 5 ? (int) dataSize : throw new BadReadException(string.Format(" Unexpected size (0x{0:X4}) for Extended Timestamp extra field at position 0x{1:X16}", (object) dataSize, (object) posn)); - ZipEntry.Func func = new ZipEntry.Func(cDisplayClass4.\u003CProcessExtraFieldUnixTimes\u003Eb__3); - if (dataSize == (short) 13 || this._readExtraDepth > 0) - { - byte num = cDisplayClass4.buffer[cDisplayClass4.j++]; - --cDisplayClass4.remainingData; - if (((int) num & 1) != 0 && cDisplayClass4.remainingData >= 4) - this._Mtime = func(); - this._Atime = ((int) num & 2) == 0 || cDisplayClass4.remainingData < 4 ? DateTime.UtcNow : func(); - this._Ctime = ((int) num & 4) == 0 || cDisplayClass4.remainingData < 4 ? DateTime.UtcNow : func(); - this._timestamp |= ZipEntryTimestamp.Unix; - this._ntfsTimesAreSet = true; - this._emitUnixTimes = true; - } - else - this.ReadExtraField(); - return cDisplayClass4.j; - } - - private int ProcessExtraFieldWindowsTimes(byte[] buffer, int j, short dataSize, long posn) - { - if (dataSize != (short) 32) - throw new BadReadException(string.Format(" Unexpected size (0x{0:X4}) for NTFS times extra field at position 0x{1:X16}", (object) dataSize, (object) posn)); - j += 4; - short num1 = (short) ((int) buffer[j] + (int) buffer[j + 1] * 256); - short num2 = (short) ((int) buffer[j + 2] + (int) buffer[j + 3] * 256); - j += 4; - if (num1 == (short) 1 && num2 == (short) 24) - { - this._Mtime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(buffer, j)); - j += 8; - this._Atime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(buffer, j)); - j += 8; - this._Ctime = DateTime.FromFileTimeUtc(BitConverter.ToInt64(buffer, j)); - j += 8; - this._ntfsTimesAreSet = true; - this._timestamp |= ZipEntryTimestamp.Windows; - this._emitNtfsTimes = true; - } - return j; - } - - internal void WriteCentralDirectoryEntry(Stream s) - { - byte[] numArray1 = new byte[4096]; - int num1 = 0; - byte[] numArray2 = numArray1; - int index1 = num1; - int num2 = index1 + 1; - numArray2[index1] = (byte) 80; - byte[] numArray3 = numArray1; - int index2 = num2; - int num3 = index2 + 1; - numArray3[index2] = (byte) 75; - byte[] numArray4 = numArray1; - int index3 = num3; - int num4 = index3 + 1; - numArray4[index3] = (byte) 1; - byte[] numArray5 = numArray1; - int index4 = num4; - int num5 = index4 + 1; - numArray5[index4] = (byte) 2; - byte[] numArray6 = numArray1; - int index5 = num5; - int num6 = index5 + 1; - int num7 = (int) (byte) ((uint) this._VersionMadeBy & (uint) byte.MaxValue); - numArray6[index5] = (byte) num7; - byte[] numArray7 = numArray1; - int index6 = num6; - int num8 = index6 + 1; - int num9 = (int) (byte) (((int) this._VersionMadeBy & 65280) >> 8); - numArray7[index6] = (byte) num9; - short num10 = this.VersionNeeded != (short) 0 ? this.VersionNeeded : (short) 20; - if (!this._OutputUsesZip64.HasValue) - this._OutputUsesZip64 = new bool?(this._container.Zip64 == Zip64Option.Always); - short num11 = this._OutputUsesZip64.Value ? (short) 45 : num10; - if (this.CompressionMethod == CompressionMethod.BZip2) - num11 = (short) 46; - byte[] numArray8 = numArray1; - int index7 = num8; - int num12 = index7 + 1; - int num13 = (int) (byte) ((uint) num11 & (uint) byte.MaxValue); - numArray8[index7] = (byte) num13; - byte[] numArray9 = numArray1; - int index8 = num12; - int num14 = index8 + 1; - int num15 = (int) (byte) (((int) num11 & 65280) >> 8); - numArray9[index8] = (byte) num15; - byte[] numArray10 = numArray1; - int index9 = num14; - int num16 = index9 + 1; - int num17 = (int) (byte) ((uint) this._BitField & (uint) byte.MaxValue); - numArray10[index9] = (byte) num17; - byte[] numArray11 = numArray1; - int index10 = num16; - int num18 = index10 + 1; - int num19 = (int) (byte) (((int) this._BitField & 65280) >> 8); - numArray11[index10] = (byte) num19; - byte[] numArray12 = numArray1; - int index11 = num18; - int num20 = index11 + 1; - int num21 = (int) (byte) ((uint) this._CompressionMethod & (uint) byte.MaxValue); - numArray12[index11] = (byte) num21; - byte[] numArray13 = numArray1; - int index12 = num20; - int num22 = index12 + 1; - int num23 = (int) (byte) (((int) this._CompressionMethod & 65280) >> 8); - numArray13[index12] = (byte) num23; - byte[] numArray14 = numArray1; - int index13 = num22; - int num24 = index13 + 1; - int num25 = (int) (byte) (this._TimeBlob & (int) byte.MaxValue); - numArray14[index13] = (byte) num25; - byte[] numArray15 = numArray1; - int index14 = num24; - int num26 = index14 + 1; - int num27 = (int) (byte) ((this._TimeBlob & 65280) >> 8); - numArray15[index14] = (byte) num27; - byte[] numArray16 = numArray1; - int index15 = num26; - int num28 = index15 + 1; - int num29 = (int) (byte) ((this._TimeBlob & 16711680) >> 16); - numArray16[index15] = (byte) num29; - byte[] numArray17 = numArray1; - int index16 = num28; - int num30 = index16 + 1; - int num31 = (int) (byte) (((long) this._TimeBlob & 4278190080L) >> 24); - numArray17[index16] = (byte) num31; - byte[] numArray18 = numArray1; - int index17 = num30; - int num32 = index17 + 1; - int num33 = (int) (byte) (this._Crc32 & (int) byte.MaxValue); - numArray18[index17] = (byte) num33; - byte[] numArray19 = numArray1; - int index18 = num32; - int num34 = index18 + 1; - int num35 = (int) (byte) ((this._Crc32 & 65280) >> 8); - numArray19[index18] = (byte) num35; - byte[] numArray20 = numArray1; - int index19 = num34; - int num36 = index19 + 1; - int num37 = (int) (byte) ((this._Crc32 & 16711680) >> 16); - numArray20[index19] = (byte) num37; - byte[] numArray21 = numArray1; - int index20 = num36; - int num38 = index20 + 1; - int num39 = (int) (byte) (((long) this._Crc32 & 4278190080L) >> 24); - numArray21[index20] = (byte) num39; - if (this._OutputUsesZip64.Value) - { - for (int index21 = 0; index21 < 8; ++index21) - numArray1[num38++] = byte.MaxValue; - } - else - { - byte[] numArray22 = numArray1; - int index22 = num38; - int num40 = index22 + 1; - int num41 = (int) (byte) ((ulong) this._CompressedSize & (ulong) byte.MaxValue); - numArray22[index22] = (byte) num41; - byte[] numArray23 = numArray1; - int index23 = num40; - int num42 = index23 + 1; - int num43 = (int) (byte) ((this._CompressedSize & 65280L) >> 8); - numArray23[index23] = (byte) num43; - byte[] numArray24 = numArray1; - int index24 = num42; - int num44 = index24 + 1; - int num45 = (int) (byte) ((this._CompressedSize & 16711680L) >> 16); - numArray24[index24] = (byte) num45; - byte[] numArray25 = numArray1; - int index25 = num44; - int num46 = index25 + 1; - int num47 = (int) (byte) ((this._CompressedSize & 4278190080L) >> 24); - numArray25[index25] = (byte) num47; - byte[] numArray26 = numArray1; - int index26 = num46; - int num48 = index26 + 1; - int num49 = (int) (byte) ((ulong) this._UncompressedSize & (ulong) byte.MaxValue); - numArray26[index26] = (byte) num49; - byte[] numArray27 = numArray1; - int index27 = num48; - int num50 = index27 + 1; - int num51 = (int) (byte) ((this._UncompressedSize & 65280L) >> 8); - numArray27[index27] = (byte) num51; - byte[] numArray28 = numArray1; - int index28 = num50; - int num52 = index28 + 1; - int num53 = (int) (byte) ((this._UncompressedSize & 16711680L) >> 16); - numArray28[index28] = (byte) num53; - byte[] numArray29 = numArray1; - int index29 = num52; - num38 = index29 + 1; - int num54 = (int) (byte) ((this._UncompressedSize & 4278190080L) >> 24); - numArray29[index29] = (byte) num54; - } - byte[] encodedFileNameBytes = this.GetEncodedFileNameBytes(); - short length1 = (short) encodedFileNameBytes.Length; - byte[] numArray30 = numArray1; - int index30 = num38; - int num55 = index30 + 1; - int num56 = (int) (byte) ((uint) length1 & (uint) byte.MaxValue); - numArray30[index30] = (byte) num56; - byte[] numArray31 = numArray1; - int index31 = num55; - int num57 = index31 + 1; - int num58 = (int) (byte) (((int) length1 & 65280) >> 8); - numArray31[index31] = (byte) num58; - this._presumeZip64 = this._OutputUsesZip64.Value; - this._Extra = this.ConstructExtraField(true); - short length2 = this._Extra == null ? (short) 0 : (short) this._Extra.Length; - byte[] numArray32 = numArray1; - int index32 = num57; - int num59 = index32 + 1; - int num60 = (int) (byte) ((uint) length2 & (uint) byte.MaxValue); - numArray32[index32] = (byte) num60; - byte[] numArray33 = numArray1; - int index33 = num59; - int num61 = index33 + 1; - int num62 = (int) (byte) (((int) length2 & 65280) >> 8); - numArray33[index33] = (byte) num62; - int count = this._CommentBytes == null ? 0 : this._CommentBytes.Length; - if (count + num61 > numArray1.Length) - count = numArray1.Length - num61; - byte[] numArray34 = numArray1; - int index34 = num61; - int num63 = index34 + 1; - int num64 = (int) (byte) (count & (int) byte.MaxValue); - numArray34[index34] = (byte) num64; - byte[] numArray35 = numArray1; - int index35 = num63; - int num65 = index35 + 1; - int num66 = (int) (byte) ((count & 65280) >> 8); - numArray35[index35] = (byte) num66; - int num67; - if (this._container.ZipFile != null && this._container.ZipFile.MaxOutputSegmentSize != 0) - { - byte[] numArray36 = numArray1; - int index36 = num65; - int num68 = index36 + 1; - int num69 = (int) (byte) (this._diskNumber & (uint) byte.MaxValue); - numArray36[index36] = (byte) num69; - byte[] numArray37 = numArray1; - int index37 = num68; - num67 = index37 + 1; - int num70 = (int) (byte) ((this._diskNumber & 65280U) >> 8); - numArray37[index37] = (byte) num70; - } - else - { - byte[] numArray38 = numArray1; - int index38 = num65; - int num71 = index38 + 1; - numArray38[index38] = (byte) 0; - byte[] numArray39 = numArray1; - int index39 = num71; - num67 = index39 + 1; - numArray39[index39] = (byte) 0; - } - byte[] numArray40 = numArray1; - int index40 = num67; - int num72 = index40 + 1; - int num73 = this._IsText ? 1 : 0; - numArray40[index40] = (byte) num73; - byte[] numArray41 = numArray1; - int index41 = num72; - int num74 = index41 + 1; - numArray41[index41] = (byte) 0; - byte[] numArray42 = numArray1; - int index42 = num74; - int num75 = index42 + 1; - int num76 = (int) (byte) (this._ExternalFileAttrs & (int) byte.MaxValue); - numArray42[index42] = (byte) num76; - byte[] numArray43 = numArray1; - int index43 = num75; - int num77 = index43 + 1; - int num78 = (int) (byte) ((this._ExternalFileAttrs & 65280) >> 8); - numArray43[index43] = (byte) num78; - byte[] numArray44 = numArray1; - int index44 = num77; - int num79 = index44 + 1; - int num80 = (int) (byte) ((this._ExternalFileAttrs & 16711680) >> 16); - numArray44[index44] = (byte) num80; - byte[] numArray45 = numArray1; - int index45 = num79; - int num81 = index45 + 1; - int num82 = (int) (byte) (((long) this._ExternalFileAttrs & 4278190080L) >> 24); - numArray45[index45] = (byte) num82; - int dstOffset; - if (this._RelativeOffsetOfLocalHeader > (long) uint.MaxValue) - { - byte[] numArray46 = numArray1; - int index46 = num81; - int num83 = index46 + 1; - numArray46[index46] = byte.MaxValue; - byte[] numArray47 = numArray1; - int index47 = num83; - int num84 = index47 + 1; - numArray47[index47] = byte.MaxValue; - byte[] numArray48 = numArray1; - int index48 = num84; - int num85 = index48 + 1; - numArray48[index48] = byte.MaxValue; - byte[] numArray49 = numArray1; - int index49 = num85; - dstOffset = index49 + 1; - numArray49[index49] = byte.MaxValue; - } - else - { - byte[] numArray50 = numArray1; - int index50 = num81; - int num86 = index50 + 1; - int num87 = (int) (byte) ((ulong) this._RelativeOffsetOfLocalHeader & (ulong) byte.MaxValue); - numArray50[index50] = (byte) num87; - byte[] numArray51 = numArray1; - int index51 = num86; - int num88 = index51 + 1; - int num89 = (int) (byte) ((this._RelativeOffsetOfLocalHeader & 65280L) >> 8); - numArray51[index51] = (byte) num89; - byte[] numArray52 = numArray1; - int index52 = num88; - int num90 = index52 + 1; - int num91 = (int) (byte) ((this._RelativeOffsetOfLocalHeader & 16711680L) >> 16); - numArray52[index52] = (byte) num91; - byte[] numArray53 = numArray1; - int index53 = num90; - dstOffset = index53 + 1; - int num92 = (int) (byte) ((this._RelativeOffsetOfLocalHeader & 4278190080L) >> 24); - numArray53[index53] = (byte) num92; - } - Buffer.BlockCopy((Array) encodedFileNameBytes, 0, (Array) numArray1, dstOffset, (int) length1); - int num93 = dstOffset + (int) length1; - if (this._Extra != null) - { - Buffer.BlockCopy((Array) this._Extra, 0, (Array) numArray1, num93, (int) length2); - num93 += (int) length2; - } - if (count != 0) - { - Buffer.BlockCopy((Array) this._CommentBytes, 0, (Array) numArray1, num93, count); - num93 += count; - } - s.Write(numArray1, 0, num93); - } - - private byte[] ConstructExtraField(bool forCentralDirectory) - { - List numArrayList = new List(); - if (this._container.Zip64 == Zip64Option.Always || this._container.Zip64 == Zip64Option.AsNecessary && (!forCentralDirectory || this._entryRequiresZip64.Value)) - { - int length = 4 + (forCentralDirectory ? 28 : 16); - byte[] destinationArray = new byte[length]; - int num1 = 0; - int num2; - if (this._presumeZip64 || forCentralDirectory) - { - byte[] numArray1 = destinationArray; - int index1 = num1; - int num3 = index1 + 1; - numArray1[index1] = (byte) 1; - byte[] numArray2 = destinationArray; - int index2 = num3; - num2 = index2 + 1; - numArray2[index2] = (byte) 0; - } - else - { - byte[] numArray3 = destinationArray; - int index3 = num1; - int num4 = index3 + 1; - numArray3[index3] = (byte) 153; - byte[] numArray4 = destinationArray; - int index4 = num4; - num2 = index4 + 1; - numArray4[index4] = (byte) 153; - } - byte[] numArray5 = destinationArray; - int index5 = num2; - int num5 = index5 + 1; - int num6 = (int) (byte) (length - 4); - numArray5[index5] = (byte) num6; - byte[] numArray6 = destinationArray; - int index6 = num5; - int destinationIndex1 = index6 + 1; - numArray6[index6] = (byte) 0; - Array.Copy((Array) BitConverter.GetBytes(this._UncompressedSize), 0, (Array) destinationArray, destinationIndex1, 8); - int destinationIndex2 = destinationIndex1 + 8; - Array.Copy((Array) BitConverter.GetBytes(this._CompressedSize), 0, (Array) destinationArray, destinationIndex2, 8); - int destinationIndex3 = destinationIndex2 + 8; - if (forCentralDirectory) - { - Array.Copy((Array) BitConverter.GetBytes(this._RelativeOffsetOfLocalHeader), 0, (Array) destinationArray, destinationIndex3, 8); - int destinationIndex4 = destinationIndex3 + 8; - Array.Copy((Array) BitConverter.GetBytes(0), 0, (Array) destinationArray, destinationIndex4, 4); - } - numArrayList.Add(destinationArray); - } - if (this._ntfsTimesAreSet && this._emitNtfsTimes) - { - byte[] destinationArray = new byte[36]; - int num7 = 0; - byte[] numArray7 = destinationArray; - int index7 = num7; - int num8 = index7 + 1; - numArray7[index7] = (byte) 10; - byte[] numArray8 = destinationArray; - int index8 = num8; - int num9 = index8 + 1; - numArray8[index8] = (byte) 0; - byte[] numArray9 = destinationArray; - int index9 = num9; - int num10 = index9 + 1; - numArray9[index9] = (byte) 32; - byte[] numArray10 = destinationArray; - int index10 = num10; - int num11 = index10 + 1; - numArray10[index10] = (byte) 0; - int num12 = num11 + 4; - byte[] numArray11 = destinationArray; - int index11 = num12; - int num13 = index11 + 1; - numArray11[index11] = (byte) 1; - byte[] numArray12 = destinationArray; - int index12 = num13; - int num14 = index12 + 1; - numArray12[index12] = (byte) 0; - byte[] numArray13 = destinationArray; - int index13 = num14; - int num15 = index13 + 1; - numArray13[index13] = (byte) 24; - byte[] numArray14 = destinationArray; - int index14 = num15; - int destinationIndex5 = index14 + 1; - numArray14[index14] = (byte) 0; - Array.Copy((Array) BitConverter.GetBytes(this._Mtime.ToFileTime()), 0, (Array) destinationArray, destinationIndex5, 8); - int destinationIndex6 = destinationIndex5 + 8; - Array.Copy((Array) BitConverter.GetBytes(this._Atime.ToFileTime()), 0, (Array) destinationArray, destinationIndex6, 8); - int destinationIndex7 = destinationIndex6 + 8; - Array.Copy((Array) BitConverter.GetBytes(this._Ctime.ToFileTime()), 0, (Array) destinationArray, destinationIndex7, 8); - int num16 = destinationIndex7 + 8; - numArrayList.Add(destinationArray); - } - if (this._ntfsTimesAreSet && this._emitUnixTimes) - { - int length = 9; - if (!forCentralDirectory) - length += 8; - byte[] destinationArray = new byte[length]; - int num17 = 0; - byte[] numArray15 = destinationArray; - int index15 = num17; - int num18 = index15 + 1; - numArray15[index15] = (byte) 85; - byte[] numArray16 = destinationArray; - int index16 = num18; - int num19 = index16 + 1; - numArray16[index16] = (byte) 84; - byte[] numArray17 = destinationArray; - int index17 = num19; - int num20 = index17 + 1; - int num21 = (int) (byte) (length - 4); - numArray17[index17] = (byte) num21; - byte[] numArray18 = destinationArray; - int index18 = num20; - int num22 = index18 + 1; - numArray18[index18] = (byte) 0; - byte[] numArray19 = destinationArray; - int index19 = num22; - int destinationIndex8 = index19 + 1; - numArray19[index19] = (byte) 7; - Array.Copy((Array) BitConverter.GetBytes((int) (this._Mtime - ZipEntry._unixEpoch).TotalSeconds), 0, (Array) destinationArray, destinationIndex8, 4); - int destinationIndex9 = destinationIndex8 + 4; - if (!forCentralDirectory) - { - Array.Copy((Array) BitConverter.GetBytes((int) (this._Atime - ZipEntry._unixEpoch).TotalSeconds), 0, (Array) destinationArray, destinationIndex9, 4); - int destinationIndex10 = destinationIndex9 + 4; - Array.Copy((Array) BitConverter.GetBytes((int) (this._Ctime - ZipEntry._unixEpoch).TotalSeconds), 0, (Array) destinationArray, destinationIndex10, 4); - int num23 = destinationIndex10 + 4; - } - numArrayList.Add(destinationArray); - } - byte[] destinationArray1 = (byte[]) null; - if (numArrayList.Count > 0) - { - int length = 0; - int destinationIndex = 0; - for (int index = 0; index < numArrayList.Count; ++index) - length += numArrayList[index].Length; - destinationArray1 = new byte[length]; - for (int index = 0; index < numArrayList.Count; ++index) - { - Array.Copy((Array) numArrayList[index], 0, (Array) destinationArray1, destinationIndex, numArrayList[index].Length); - destinationIndex += numArrayList[index].Length; - } - } - return destinationArray1; - } - - private string NormalizeFileName() - { - string str1 = this.FileName.Replace("\\", "/"); - string str2; - if (this._TrimVolumeFromFullyQualifiedPaths && this.FileName.Length >= 3 && this.FileName[1] == ':' && str1[2] == '/') - str2 = str1.Substring(3); - else if (this.FileName.Length >= 4 && str1[0] == '/' && str1[1] == '/') - { - int num = str1.IndexOf('/', 2); - str2 = num != -1 ? str1.Substring(num + 1) : throw new ArgumentException("The path for that entry appears to be badly formatted"); - } - else - str2 = this.FileName.Length < 3 || str1[0] != '.' || str1[1] != '/' ? str1 : str1.Substring(2); - return str2; - } - - private byte[] GetEncodedFileNameBytes() - { - string s = this.NormalizeFileName(); - switch (this.AlternateEncodingUsage) - { - case ZipOption.Default: - if (this._Comment != null && this._Comment.Length != 0) - this._CommentBytes = ZipEntry.ibm437.GetBytes(this._Comment); - this._actualEncoding = ZipEntry.ibm437; - return ZipEntry.ibm437.GetBytes(s); - case ZipOption.Always: - if (this._Comment != null && this._Comment.Length != 0) - this._CommentBytes = this.AlternateEncoding.GetBytes(this._Comment); - this._actualEncoding = this.AlternateEncoding; - return this.AlternateEncoding.GetBytes(s); - default: - byte[] bytes1 = ZipEntry.ibm437.GetBytes(s); - string str = ZipEntry.ibm437.GetString(bytes1, 0, bytes1.Length); - this._CommentBytes = (byte[]) null; - if (str != s) - { - byte[] bytes2 = this.AlternateEncoding.GetBytes(s); - if (this._Comment != null && this._Comment.Length != 0) - this._CommentBytes = this.AlternateEncoding.GetBytes(this._Comment); - this._actualEncoding = this.AlternateEncoding; - return bytes2; - } - this._actualEncoding = ZipEntry.ibm437; - if (this._Comment == null || this._Comment.Length == 0) - return bytes1; - byte[] bytes3 = ZipEntry.ibm437.GetBytes(this._Comment); - if (ZipEntry.ibm437.GetString(bytes3, 0, bytes3.Length) != this.Comment) - { - byte[] bytes4 = this.AlternateEncoding.GetBytes(s); - this._CommentBytes = this.AlternateEncoding.GetBytes(this._Comment); - this._actualEncoding = this.AlternateEncoding; - return bytes4; - } - this._CommentBytes = bytes3; - return bytes1; - } - } - - private bool WantReadAgain() => this._UncompressedSize >= 16L && this._CompressionMethod != (short) 0 && this.CompressionLevel != CompressionLevel.None && this._CompressedSize >= this._UncompressedSize && (this._Source != ZipEntrySource.Stream || this._sourceStream.CanSeek) && (this._zipCrypto_forWrite == null || this.CompressedSize - 12L > this.UncompressedSize); - - private void MaybeUnsetCompressionMethodForWriting(int cycle) - { - if (cycle > 1) - this._CompressionMethod = (short) 0; - else if (this.IsDirectory) - { - this._CompressionMethod = (short) 0; - } - else - { - if (this._Source == ZipEntrySource.ZipFile) - return; - if (this._Source == ZipEntrySource.Stream) - { - if (this._sourceStream != null && this._sourceStream.CanSeek && this._sourceStream.Length == 0L) - { - this._CompressionMethod = (short) 0; - return; - } - } - else if (this._Source == ZipEntrySource.FileSystem && SharedUtilities.GetFileLength(this.LocalFileName) == 0L) - { - this._CompressionMethod = (short) 0; - return; - } - if (this.SetCompression != null) - this.CompressionLevel = this.SetCompression(this.LocalFileName, this._FileNameInArchive); - if (this.CompressionLevel != CompressionLevel.None || this.CompressionMethod != CompressionMethod.Deflate) - return; - this._CompressionMethod = (short) 0; - } - } - - internal void WriteHeader(Stream s, int cycle) - { - this._future_ROLH = s is CountingStream countingStream ? countingStream.ComputedPosition : s.Position; - int num1 = 0; - byte[] src = new byte[30]; - byte[] numArray1 = src; - int index1 = num1; - int num2 = index1 + 1; - numArray1[index1] = (byte) 80; - byte[] numArray2 = src; - int index2 = num2; - int num3 = index2 + 1; - numArray2[index2] = (byte) 75; - byte[] numArray3 = src; - int index3 = num3; - int num4 = index3 + 1; - numArray3[index3] = (byte) 3; - byte[] numArray4 = src; - int index4 = num4; - int num5 = index4 + 1; - numArray4[index4] = (byte) 4; - this._presumeZip64 = this._container.Zip64 == Zip64Option.Always || this._container.Zip64 == Zip64Option.AsNecessary && !s.CanSeek; - short num6 = this._presumeZip64 ? (short) 45 : (short) 20; - if (this.CompressionMethod == CompressionMethod.BZip2) - num6 = (short) 46; - byte[] numArray5 = src; - int index5 = num5; - int num7 = index5 + 1; - int num8 = (int) (byte) ((uint) num6 & (uint) byte.MaxValue); - numArray5[index5] = (byte) num8; - byte[] numArray6 = src; - int index6 = num7; - int num9 = index6 + 1; - int num10 = (int) (byte) (((int) num6 & 65280) >> 8); - numArray6[index6] = (byte) num10; - byte[] encodedFileNameBytes = this.GetEncodedFileNameBytes(); - short length1 = (short) encodedFileNameBytes.Length; - if (this._Encryption == EncryptionAlgorithm.None) - this._BitField &= (short) -2; - else - this._BitField |= (short) 1; - if (this._actualEncoding.CodePage == Encoding.UTF8.CodePage) - this._BitField |= (short) 2048; - if (this.IsDirectory || cycle == 99) - { - this._BitField &= (short) -9; - this._BitField &= (short) -2; - this.Encryption = EncryptionAlgorithm.None; - this.Password = (string) null; - } - else if (!s.CanSeek) - this._BitField |= (short) 8; - byte[] numArray7 = src; - int index7 = num9; - int num11 = index7 + 1; - int num12 = (int) (byte) ((uint) this._BitField & (uint) byte.MaxValue); - numArray7[index7] = (byte) num12; - byte[] numArray8 = src; - int index8 = num11; - int num13 = index8 + 1; - int num14 = (int) (byte) (((int) this._BitField & 65280) >> 8); - numArray8[index8] = (byte) num14; - if (this.__FileDataPosition == -1L) - { - this._CompressedSize = 0L; - this._crcCalculated = false; - } - this.MaybeUnsetCompressionMethodForWriting(cycle); - byte[] numArray9 = src; - int index9 = num13; - int num15 = index9 + 1; - int num16 = (int) (byte) ((uint) this._CompressionMethod & (uint) byte.MaxValue); - numArray9[index9] = (byte) num16; - byte[] numArray10 = src; - int index10 = num15; - int num17 = index10 + 1; - int num18 = (int) (byte) (((int) this._CompressionMethod & 65280) >> 8); - numArray10[index10] = (byte) num18; - if (cycle == 99) - this.SetZip64Flags(); - this._TimeBlob = SharedUtilities.DateTimeToPacked(this.LastModified); - byte[] numArray11 = src; - int index11 = num17; - int num19 = index11 + 1; - int num20 = (int) (byte) (this._TimeBlob & (int) byte.MaxValue); - numArray11[index11] = (byte) num20; - byte[] numArray12 = src; - int index12 = num19; - int num21 = index12 + 1; - int num22 = (int) (byte) ((this._TimeBlob & 65280) >> 8); - numArray12[index12] = (byte) num22; - byte[] numArray13 = src; - int index13 = num21; - int num23 = index13 + 1; - int num24 = (int) (byte) ((this._TimeBlob & 16711680) >> 16); - numArray13[index13] = (byte) num24; - byte[] numArray14 = src; - int index14 = num23; - int num25 = index14 + 1; - int num26 = (int) (byte) (((long) this._TimeBlob & 4278190080L) >> 24); - numArray14[index14] = (byte) num26; - byte[] numArray15 = src; - int index15 = num25; - int num27 = index15 + 1; - int num28 = (int) (byte) (this._Crc32 & (int) byte.MaxValue); - numArray15[index15] = (byte) num28; - byte[] numArray16 = src; - int index16 = num27; - int num29 = index16 + 1; - int num30 = (int) (byte) ((this._Crc32 & 65280) >> 8); - numArray16[index16] = (byte) num30; - byte[] numArray17 = src; - int index17 = num29; - int num31 = index17 + 1; - int num32 = (int) (byte) ((this._Crc32 & 16711680) >> 16); - numArray17[index17] = (byte) num32; - byte[] numArray18 = src; - int index18 = num31; - int num33 = index18 + 1; - int num34 = (int) (byte) (((long) this._Crc32 & 4278190080L) >> 24); - numArray18[index18] = (byte) num34; - if (this._presumeZip64) - { - for (int index19 = 0; index19 < 8; ++index19) - src[num33++] = byte.MaxValue; - } - else - { - byte[] numArray19 = src; - int index20 = num33; - int num35 = index20 + 1; - int num36 = (int) (byte) ((ulong) this._CompressedSize & (ulong) byte.MaxValue); - numArray19[index20] = (byte) num36; - byte[] numArray20 = src; - int index21 = num35; - int num37 = index21 + 1; - int num38 = (int) (byte) ((this._CompressedSize & 65280L) >> 8); - numArray20[index21] = (byte) num38; - byte[] numArray21 = src; - int index22 = num37; - int num39 = index22 + 1; - int num40 = (int) (byte) ((this._CompressedSize & 16711680L) >> 16); - numArray21[index22] = (byte) num40; - byte[] numArray22 = src; - int index23 = num39; - int num41 = index23 + 1; - int num42 = (int) (byte) ((this._CompressedSize & 4278190080L) >> 24); - numArray22[index23] = (byte) num42; - byte[] numArray23 = src; - int index24 = num41; - int num43 = index24 + 1; - int num44 = (int) (byte) ((ulong) this._UncompressedSize & (ulong) byte.MaxValue); - numArray23[index24] = (byte) num44; - byte[] numArray24 = src; - int index25 = num43; - int num45 = index25 + 1; - int num46 = (int) (byte) ((this._UncompressedSize & 65280L) >> 8); - numArray24[index25] = (byte) num46; - byte[] numArray25 = src; - int index26 = num45; - int num47 = index26 + 1; - int num48 = (int) (byte) ((this._UncompressedSize & 16711680L) >> 16); - numArray25[index26] = (byte) num48; - byte[] numArray26 = src; - int index27 = num47; - num33 = index27 + 1; - int num49 = (int) (byte) ((this._UncompressedSize & 4278190080L) >> 24); - numArray26[index27] = (byte) num49; - } - byte[] numArray27 = src; - int index28 = num33; - int num50 = index28 + 1; - int num51 = (int) (byte) ((uint) length1 & (uint) byte.MaxValue); - numArray27[index28] = (byte) num51; - byte[] numArray28 = src; - int index29 = num50; - int num52 = index29 + 1; - int num53 = (int) (byte) (((int) length1 & 65280) >> 8); - numArray28[index29] = (byte) num53; - this._Extra = this.ConstructExtraField(false); - short length2 = this._Extra == null ? (short) 0 : (short) this._Extra.Length; - byte[] numArray29 = src; - int index30 = num52; - int num54 = index30 + 1; - int num55 = (int) (byte) ((uint) length2 & (uint) byte.MaxValue); - numArray29[index30] = (byte) num55; - byte[] numArray30 = src; - int index31 = num54; - int num56 = index31 + 1; - int num57 = (int) (byte) (((int) length2 & 65280) >> 8); - numArray30[index31] = (byte) num57; - byte[] numArray31 = new byte[num56 + (int) length1 + (int) length2]; - Buffer.BlockCopy((Array) src, 0, (Array) numArray31, 0, num56); - Buffer.BlockCopy((Array) encodedFileNameBytes, 0, (Array) numArray31, num56, encodedFileNameBytes.Length); - int num58 = num56 + encodedFileNameBytes.Length; - if (this._Extra != null) - { - Buffer.BlockCopy((Array) this._Extra, 0, (Array) numArray31, num58, this._Extra.Length); - num58 += this._Extra.Length; - } - this._LengthOfHeader = num58; - if (s is ZipSegmentedStream zipSegmentedStream) - { - zipSegmentedStream.ContiguousWrite = true; - uint segment = zipSegmentedStream.ComputeSegment(num58); - this._future_ROLH = (int) segment == (int) zipSegmentedStream.CurrentSegment ? zipSegmentedStream.Position : 0L; - this._diskNumber = segment; - } - if (this._container.Zip64 == Zip64Option.Default && (uint) this._RelativeOffsetOfLocalHeader >= uint.MaxValue) - throw new ZipException("Offset within the zip archive exceeds 0xFFFFFFFF. Consider setting the UseZip64WhenSaving property on the ZipFile instance."); - s.Write(numArray31, 0, num58); - if (zipSegmentedStream != null) - zipSegmentedStream.ContiguousWrite = false; - this._EntryHeader = numArray31; - } - - private int FigureCrc32() - { - if (!this._crcCalculated) - { - Stream input = (Stream) null; - if (this._Source == ZipEntrySource.WriteDelegate) - { - CrcCalculatorStream calculatorStream = new CrcCalculatorStream(Stream.Null); - this._WriteDelegate(this.FileName, (Stream) calculatorStream); - this._Crc32 = calculatorStream.Crc; - } - else if (this._Source != ZipEntrySource.ZipFile) - { - if (this._Source == ZipEntrySource.Stream) - { - this.PrepSourceStream(); - input = this._sourceStream; - } - else if (this._Source == ZipEntrySource.JitStream) - { - if (this._sourceStream == null) - this._sourceStream = this._OpenDelegate(this.FileName); - this.PrepSourceStream(); - input = this._sourceStream; - } - else if (this._Source != ZipEntrySource.ZipOutputStream) - input = (Stream) File.Open(this.LocalFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - this._Crc32 = new CRC32().GetCrc32(input); - if (this._sourceStream == null) - input.Close(); - } - this._crcCalculated = true; - } - return this._Crc32; - } - - private void PrepSourceStream() - { - if (this._sourceStream == null) - throw new ZipException(string.Format("The input stream is null for entry '{0}'.", (object) this.FileName)); - if (this._sourceStreamOriginalPosition.HasValue) - this._sourceStream.Position = this._sourceStreamOriginalPosition.Value; - else if (this._sourceStream.CanSeek) - this._sourceStreamOriginalPosition = new long?(this._sourceStream.Position); - else if (this.Encryption == EncryptionAlgorithm.PkzipWeak && this._Source != ZipEntrySource.ZipFile && ((int) this._BitField & 8) != 8) - throw new ZipException("It is not possible to use PKZIP encryption on a non-seekable input stream"); - } - - internal void CopyMetaData(ZipEntry source) - { - this.__FileDataPosition = source.__FileDataPosition; - this.CompressionMethod = source.CompressionMethod; - this._CompressionMethod_FromZipFile = source._CompressionMethod_FromZipFile; - this._CompressedFileDataSize = source._CompressedFileDataSize; - this._UncompressedSize = source._UncompressedSize; - this._BitField = source._BitField; - this._Source = source._Source; - this._LastModified = source._LastModified; - this._Mtime = source._Mtime; - this._Atime = source._Atime; - this._Ctime = source._Ctime; - this._ntfsTimesAreSet = source._ntfsTimesAreSet; - this._emitUnixTimes = source._emitUnixTimes; - this._emitNtfsTimes = source._emitNtfsTimes; - } - - private void OnWriteBlock(long bytesXferred, long totalBytesToXfer) - { - if (this._container.ZipFile == null) - return; - this._ioOperationCanceled = this._container.ZipFile.OnSaveBlock(this, bytesXferred, totalBytesToXfer); - } - - private void _WriteEntryData(Stream s) - { - Stream input = (Stream) null; - long num1 = -1; - try - { - num1 = s.Position; - } - catch (Exception ex) - { - } - try - { - long num2 = this.SetInputAndFigureFileLength(ref input); - CountingStream countingStream = new CountingStream(s); - Stream stream1; - Stream stream2; - if (num2 != 0L) - { - stream1 = this.MaybeApplyEncryption((Stream) countingStream); - stream2 = this.MaybeApplyCompression(stream1, num2); - } - else - stream1 = stream2 = (Stream) countingStream; - CrcCalculatorStream output = new CrcCalculatorStream(stream2, true); - if (this._Source == ZipEntrySource.WriteDelegate) - { - this._WriteDelegate(this.FileName, (Stream) output); - } - else - { - byte[] buffer = new byte[this.BufferSize]; - int count; - while ((count = SharedUtilities.ReadWithRetry(input, buffer, 0, buffer.Length, this.FileName)) != 0) - { - output.Write(buffer, 0, count); - this.OnWriteBlock(output.TotalBytesSlurped, num2); - if (this._ioOperationCanceled) - break; - } - } - this.FinishOutputStream(s, countingStream, stream1, stream2, output); - } - finally - { - if (this._Source == ZipEntrySource.JitStream) - { - if (this._CloseDelegate != null) - this._CloseDelegate(this.FileName, input); - } - else if (input is FileStream) - input.Close(); - } - if (this._ioOperationCanceled) - return; - this.__FileDataPosition = num1; - this.PostProcessOutput(s); - } - - private long SetInputAndFigureFileLength(ref Stream input) - { - long num = -1; - if (this._Source == ZipEntrySource.Stream) - { - this.PrepSourceStream(); - input = this._sourceStream; - try - { - num = this._sourceStream.Length; - } - catch (NotSupportedException ex) - { - } - } - else if (this._Source == ZipEntrySource.ZipFile) - { - this._sourceStream = (Stream) this.InternalOpenReader(this._Encryption_FromZipFile == EncryptionAlgorithm.None ? (string) null : this._Password ?? this._container.Password); - this.PrepSourceStream(); - input = this._sourceStream; - num = this._sourceStream.Length; - } - else if (this._Source == ZipEntrySource.JitStream) - { - if (this._sourceStream == null) - this._sourceStream = this._OpenDelegate(this.FileName); - this.PrepSourceStream(); - input = this._sourceStream; - try - { - num = this._sourceStream.Length; - } - catch (NotSupportedException ex) - { - } - } - else if (this._Source == ZipEntrySource.FileSystem) - { - FileShare share = FileShare.ReadWrite; - input = (Stream) File.Open(this.LocalFileName, FileMode.Open, FileAccess.Read, share); - num = input.Length; - } - return num; - } - - internal void FinishOutputStream( - Stream s, - CountingStream entryCounter, - Stream encryptor, - Stream compressor, - CrcCalculatorStream output) - { - if (output == null) - return; - output.Close(); - switch (compressor) - { - case DeflateStream _: - compressor.Close(); - break; - case BZip2OutputStream _: - compressor.Close(); - break; - } - encryptor.Flush(); - encryptor.Close(); - this._LengthOfTrailer = 0; - this._UncompressedSize = output.TotalBytesSlurped; - this._CompressedFileDataSize = entryCounter.BytesWritten; - this._CompressedSize = this._CompressedFileDataSize; - this._Crc32 = output.Crc; - this.StoreRelativeOffset(); - } - - internal void PostProcessOutput(Stream s) - { - CountingStream countingStream = s as CountingStream; - if (this._UncompressedSize == 0L && this._CompressedSize == 0L) - { - if (this._Source == ZipEntrySource.ZipOutputStream) - return; - if (this._Password != null) - { - int delta = 0; - if (this.Encryption == EncryptionAlgorithm.PkzipWeak) - delta = 12; - if (this._Source == ZipEntrySource.ZipOutputStream && !s.CanSeek) - throw new ZipException("Zero bytes written, encryption in use, and non-seekable output."); - if (this.Encryption != EncryptionAlgorithm.None) - { - s.Seek((long) (-1 * delta), SeekOrigin.Current); - s.SetLength(s.Position); - SharedUtilities.Workaround_Ladybug318918(s); - countingStream?.Adjust((long) delta); - this._LengthOfHeader -= delta; - this.__FileDataPosition -= (long) delta; - } - this._Password = (string) null; - this._BitField &= (short) -2; - int num1 = 6; - byte[] entryHeader1 = this._EntryHeader; - int index1 = num1; - int num2 = index1 + 1; - int num3 = (int) (byte) ((uint) this._BitField & (uint) byte.MaxValue); - entryHeader1[index1] = (byte) num3; - byte[] entryHeader2 = this._EntryHeader; - int index2 = num2; - int num4 = index2 + 1; - int num5 = (int) (byte) (((int) this._BitField & 65280) >> 8); - entryHeader2[index2] = (byte) num5; - } - this.CompressionMethod = CompressionMethod.None; - this.Encryption = EncryptionAlgorithm.None; - } - else if (this._zipCrypto_forWrite != null && this.Encryption == EncryptionAlgorithm.PkzipWeak) - this._CompressedSize += 12L; - int num6 = 8; - byte[] entryHeader3 = this._EntryHeader; - int index3 = num6; - int num7 = index3 + 1; - int num8 = (int) (byte) ((uint) this._CompressionMethod & (uint) byte.MaxValue); - entryHeader3[index3] = (byte) num8; - byte[] entryHeader4 = this._EntryHeader; - int index4 = num7; - int num9 = index4 + 1; - int num10 = (int) (byte) (((int) this._CompressionMethod & 65280) >> 8); - entryHeader4[index4] = (byte) num10; - int num11 = 14; - byte[] entryHeader5 = this._EntryHeader; - int index5 = num11; - int num12 = index5 + 1; - int num13 = (int) (byte) (this._Crc32 & (int) byte.MaxValue); - entryHeader5[index5] = (byte) num13; - byte[] entryHeader6 = this._EntryHeader; - int index6 = num12; - int num14 = index6 + 1; - int num15 = (int) (byte) ((this._Crc32 & 65280) >> 8); - entryHeader6[index6] = (byte) num15; - byte[] entryHeader7 = this._EntryHeader; - int index7 = num14; - int num16 = index7 + 1; - int num17 = (int) (byte) ((this._Crc32 & 16711680) >> 16); - entryHeader7[index7] = (byte) num17; - byte[] entryHeader8 = this._EntryHeader; - int index8 = num16; - int num18 = index8 + 1; - int num19 = (int) (byte) (((long) this._Crc32 & 4278190080L) >> 24); - entryHeader8[index8] = (byte) num19; - this.SetZip64Flags(); - short num20 = (short) ((int) this._EntryHeader[26] + (int) this._EntryHeader[27] * 256); - short num21 = (short) ((int) this._EntryHeader[28] + (int) this._EntryHeader[29] * 256); - if (this._OutputUsesZip64.Value) - { - this._EntryHeader[4] = (byte) 45; - this._EntryHeader[5] = (byte) 0; - for (int index9 = 0; index9 < 8; ++index9) - this._EntryHeader[num18++] = byte.MaxValue; - int num22 = 30 + (int) num20; - byte[] entryHeader9 = this._EntryHeader; - int index10 = num22; - int num23 = index10 + 1; - entryHeader9[index10] = (byte) 1; - byte[] entryHeader10 = this._EntryHeader; - int index11 = num23; - int num24 = index11 + 1; - entryHeader10[index11] = (byte) 0; - int destinationIndex1 = num24 + 2; - Array.Copy((Array) BitConverter.GetBytes(this._UncompressedSize), 0, (Array) this._EntryHeader, destinationIndex1, 8); - int destinationIndex2 = destinationIndex1 + 8; - Array.Copy((Array) BitConverter.GetBytes(this._CompressedSize), 0, (Array) this._EntryHeader, destinationIndex2, 8); - } - else - { - this._EntryHeader[4] = (byte) 20; - this._EntryHeader[5] = (byte) 0; - int num25 = 18; - byte[] entryHeader11 = this._EntryHeader; - int index12 = num25; - int num26 = index12 + 1; - int num27 = (int) (byte) ((ulong) this._CompressedSize & (ulong) byte.MaxValue); - entryHeader11[index12] = (byte) num27; - byte[] entryHeader12 = this._EntryHeader; - int index13 = num26; - int num28 = index13 + 1; - int num29 = (int) (byte) ((this._CompressedSize & 65280L) >> 8); - entryHeader12[index13] = (byte) num29; - byte[] entryHeader13 = this._EntryHeader; - int index14 = num28; - int num30 = index14 + 1; - int num31 = (int) (byte) ((this._CompressedSize & 16711680L) >> 16); - entryHeader13[index14] = (byte) num31; - byte[] entryHeader14 = this._EntryHeader; - int index15 = num30; - int num32 = index15 + 1; - int num33 = (int) (byte) ((this._CompressedSize & 4278190080L) >> 24); - entryHeader14[index15] = (byte) num33; - byte[] entryHeader15 = this._EntryHeader; - int index16 = num32; - int num34 = index16 + 1; - int num35 = (int) (byte) ((ulong) this._UncompressedSize & (ulong) byte.MaxValue); - entryHeader15[index16] = (byte) num35; - byte[] entryHeader16 = this._EntryHeader; - int index17 = num34; - int num36 = index17 + 1; - int num37 = (int) (byte) ((this._UncompressedSize & 65280L) >> 8); - entryHeader16[index17] = (byte) num37; - byte[] entryHeader17 = this._EntryHeader; - int index18 = num36; - int num38 = index18 + 1; - int num39 = (int) (byte) ((this._UncompressedSize & 16711680L) >> 16); - entryHeader17[index18] = (byte) num39; - byte[] entryHeader18 = this._EntryHeader; - int index19 = num38; - num9 = index19 + 1; - int num40 = (int) (byte) ((this._UncompressedSize & 4278190080L) >> 24); - entryHeader18[index19] = (byte) num40; - if (num21 != (short) 0) - { - int num41 = 30 + (int) num20; - if ((short) ((int) this._EntryHeader[num41 + 2] + (int) this._EntryHeader[num41 + 3] * 256) == (short) 16) - { - byte[] entryHeader19 = this._EntryHeader; - int index20 = num41; - int num42 = index20 + 1; - entryHeader19[index20] = (byte) 153; - byte[] entryHeader20 = this._EntryHeader; - int index21 = num42; - num9 = index21 + 1; - entryHeader20[index21] = (byte) 153; - } - } - } - if (((int) this._BitField & 8) != 8 || this._Source == ZipEntrySource.ZipOutputStream && s.CanSeek) - { - if (s is ZipSegmentedStream zipSegmentedStream && (int) this._diskNumber != (int) zipSegmentedStream.CurrentSegment) - { - using (Stream stream = ZipSegmentedStream.ForUpdate(this._container.ZipFile.Name, this._diskNumber)) - { - stream.Seek(this._RelativeOffsetOfLocalHeader, SeekOrigin.Begin); - stream.Write(this._EntryHeader, 0, this._EntryHeader.Length); - } - } - else - { - s.Seek(this._RelativeOffsetOfLocalHeader, SeekOrigin.Begin); - s.Write(this._EntryHeader, 0, this._EntryHeader.Length); - countingStream?.Adjust((long) this._EntryHeader.Length); - s.Seek(this._CompressedSize, SeekOrigin.Current); - } - } - if (((int) this._BitField & 8) != 8 || this.IsDirectory) - return; - byte[] numArray1 = new byte[16 + (this._OutputUsesZip64.Value ? 8 : 0)]; - int destinationIndex3 = 0; - Array.Copy((Array) BitConverter.GetBytes(134695760), 0, (Array) numArray1, destinationIndex3, 4); - int destinationIndex4 = destinationIndex3 + 4; - Array.Copy((Array) BitConverter.GetBytes(this._Crc32), 0, (Array) numArray1, destinationIndex4, 4); - int destinationIndex5 = destinationIndex4 + 4; - if (this._OutputUsesZip64.Value) - { - Array.Copy((Array) BitConverter.GetBytes(this._CompressedSize), 0, (Array) numArray1, destinationIndex5, 8); - int destinationIndex6 = destinationIndex5 + 8; - Array.Copy((Array) BitConverter.GetBytes(this._UncompressedSize), 0, (Array) numArray1, destinationIndex6, 8); - num9 = destinationIndex6 + 8; - } - else - { - byte[] numArray2 = numArray1; - int index22 = destinationIndex5; - int num43 = index22 + 1; - int num44 = (int) (byte) ((ulong) this._CompressedSize & (ulong) byte.MaxValue); - numArray2[index22] = (byte) num44; - byte[] numArray3 = numArray1; - int index23 = num43; - int num45 = index23 + 1; - int num46 = (int) (byte) ((this._CompressedSize & 65280L) >> 8); - numArray3[index23] = (byte) num46; - byte[] numArray4 = numArray1; - int index24 = num45; - int num47 = index24 + 1; - int num48 = (int) (byte) ((this._CompressedSize & 16711680L) >> 16); - numArray4[index24] = (byte) num48; - byte[] numArray5 = numArray1; - int index25 = num47; - int num49 = index25 + 1; - int num50 = (int) (byte) ((this._CompressedSize & 4278190080L) >> 24); - numArray5[index25] = (byte) num50; - byte[] numArray6 = numArray1; - int index26 = num49; - int num51 = index26 + 1; - int num52 = (int) (byte) ((ulong) this._UncompressedSize & (ulong) byte.MaxValue); - numArray6[index26] = (byte) num52; - byte[] numArray7 = numArray1; - int index27 = num51; - int num53 = index27 + 1; - int num54 = (int) (byte) ((this._UncompressedSize & 65280L) >> 8); - numArray7[index27] = (byte) num54; - byte[] numArray8 = numArray1; - int index28 = num53; - int num55 = index28 + 1; - int num56 = (int) (byte) ((this._UncompressedSize & 16711680L) >> 16); - numArray8[index28] = (byte) num56; - byte[] numArray9 = numArray1; - int index29 = num55; - num9 = index29 + 1; - int num57 = (int) (byte) ((this._UncompressedSize & 4278190080L) >> 24); - numArray9[index29] = (byte) num57; - } - s.Write(numArray1, 0, numArray1.Length); - this._LengthOfTrailer += numArray1.Length; - } - - private void SetZip64Flags() - { - this._entryRequiresZip64 = new bool?(this._CompressedSize >= (long) uint.MaxValue || this._UncompressedSize >= (long) uint.MaxValue || this._RelativeOffsetOfLocalHeader >= (long) uint.MaxValue); - if (this._container.Zip64 == Zip64Option.Default && this._entryRequiresZip64.Value) - throw new ZipException("Compressed or Uncompressed size, or offset exceeds the maximum value. Consider setting the UseZip64WhenSaving property on the ZipFile instance."); - this._OutputUsesZip64 = new bool?(this._container.Zip64 == Zip64Option.Always || this._entryRequiresZip64.Value); - } - - internal void PrepOutputStream( - Stream s, - long streamLength, - out CountingStream outputCounter, - out Stream encryptor, - out Stream compressor, - out CrcCalculatorStream output) - { - outputCounter = new CountingStream(s); - if (streamLength != 0L) - { - encryptor = this.MaybeApplyEncryption((Stream) outputCounter); - compressor = this.MaybeApplyCompression(encryptor, streamLength); - } - else - encryptor = compressor = (Stream) outputCounter; - output = new CrcCalculatorStream(compressor, true); - } - - private Stream MaybeApplyCompression(Stream s, long streamLength) - { - if (this._CompressionMethod == (short) 8 && this.CompressionLevel != CompressionLevel.None) - { - DeflateStream deflateStream = new DeflateStream(s, CompressionMode.Compress, this.CompressionLevel, true); - if (this._container.CodecBufferSize > 0) - deflateStream.BufferSize = this._container.CodecBufferSize; - deflateStream.Strategy = this._container.Strategy; - return (Stream) deflateStream; - } - return this._CompressionMethod == (short) 12 ? (Stream) new BZip2OutputStream(s, true) : s; - } - - private Stream MaybeApplyEncryption(Stream s) => this.Encryption == EncryptionAlgorithm.PkzipWeak ? (Stream) new ZipCipherStream(s, this._zipCrypto_forWrite, CryptoMode.Encrypt) : s; - - private void OnZipErrorWhileSaving(Exception e) - { - if (this._container.ZipFile == null) - return; - this._ioOperationCanceled = this._container.ZipFile.OnZipErrorSaving(this, e); - } - - internal void Write(Stream s) - { - CountingStream countingStream = s as CountingStream; - ZipSegmentedStream zipSegmentedStream = s as ZipSegmentedStream; - bool flag1 = false; - do - { - try - { - if (this._Source == ZipEntrySource.ZipFile && !this._restreamRequiredOnSave) - { - this.CopyThroughOneEntry(s); - break; - } - if (this.IsDirectory) - { - this.WriteHeader(s, 1); - this.StoreRelativeOffset(); - this._entryRequiresZip64 = new bool?(this._RelativeOffsetOfLocalHeader >= (long) uint.MaxValue); - this._OutputUsesZip64 = new bool?(this._container.Zip64 == Zip64Option.Always || this._entryRequiresZip64.Value); - if (zipSegmentedStream == null) - break; - this._diskNumber = zipSegmentedStream.CurrentSegment; - break; - } - int cycle = 0; - bool flag2; - do - { - ++cycle; - this.WriteHeader(s, cycle); - this.WriteSecurityMetadata(s); - this._WriteEntryData(s); - this._TotalEntrySize = (long) this._LengthOfHeader + this._CompressedFileDataSize + (long) this._LengthOfTrailer; - flag2 = cycle <= 1 && s.CanSeek && this.WantReadAgain(); - if (flag2) - { - if (zipSegmentedStream != null) - zipSegmentedStream.TruncateBackward(this._diskNumber, this._RelativeOffsetOfLocalHeader); - else - s.Seek(this._RelativeOffsetOfLocalHeader, SeekOrigin.Begin); - s.SetLength(s.Position); - countingStream?.Adjust(this._TotalEntrySize); - } - } - while (flag2); - this._skippedDuringSave = false; - flag1 = true; - } - catch (Exception ex) - { - ZipErrorAction zipErrorAction = this.ZipErrorAction; - int num1 = 0; - while (this.ZipErrorAction != ZipErrorAction.Throw) - { - if (this.ZipErrorAction == ZipErrorAction.Skip || this.ZipErrorAction == ZipErrorAction.Retry) - { - long num2 = countingStream != null ? countingStream.ComputedPosition : s.Position; - long offset = num2 - this._future_ROLH; - if (offset > 0L) - { - s.Seek(offset, SeekOrigin.Current); - long position = s.Position; - s.SetLength(s.Position); - countingStream?.Adjust(num2 - position); - } - if (this.ZipErrorAction == ZipErrorAction.Skip) - { - this.WriteStatus("Skipping file {0} (exception: {1})", (object) this.LocalFileName, (object) ex.ToString()); - this._skippedDuringSave = true; - flag1 = true; - goto label_32; - } - else - { - this.ZipErrorAction = zipErrorAction; - goto label_32; - } - } - else if (num1 > 0) - { - throw; - } - else - { - if (this.ZipErrorAction == ZipErrorAction.InvokeErrorEvent) - { - this.OnZipErrorWhileSaving(ex); - if (this._ioOperationCanceled) - { - flag1 = true; - goto label_32; - } - } - ++num1; - } - } - throw; - } -label_32:; - } - while (!flag1); - } - - internal void StoreRelativeOffset() => this._RelativeOffsetOfLocalHeader = this._future_ROLH; - - internal void NotifySaveComplete() - { - this._Encryption_FromZipFile = this._Encryption; - this._CompressionMethod_FromZipFile = this._CompressionMethod; - this._restreamRequiredOnSave = false; - this._metadataChanged = false; - this._Source = ZipEntrySource.ZipFile; - } - - internal void WriteSecurityMetadata(Stream outstream) - { - if (this.Encryption == EncryptionAlgorithm.None) - return; - string password = this._Password; - if (this._Source == ZipEntrySource.ZipFile && password == null) - password = this._container.Password; - if (password == null) - { - this._zipCrypto_forWrite = (ZipCrypto) null; - } - else - { - if (this.Encryption != EncryptionAlgorithm.PkzipWeak) - return; - this._zipCrypto_forWrite = ZipCrypto.ForWrite(password); - Random random = new Random(); - byte[] numArray = new byte[12]; - random.NextBytes(numArray); - if (((int) this._BitField & 8) == 8) - { - this._TimeBlob = SharedUtilities.DateTimeToPacked(this.LastModified); - numArray[11] = (byte) (this._TimeBlob >> 8 & (int) byte.MaxValue); - } - else - { - this.FigureCrc32(); - numArray[11] = (byte) (this._Crc32 >> 24 & (int) byte.MaxValue); - } - byte[] buffer = this._zipCrypto_forWrite.EncryptMessage(numArray, numArray.Length); - outstream.Write(buffer, 0, buffer.Length); - this._LengthOfHeader += buffer.Length; - } - } - - private void CopyThroughOneEntry(Stream outStream) - { - if (this.LengthOfHeader == 0) - throw new BadStateException("Bad header length."); - if (this._metadataChanged || this.ArchiveStream is ZipSegmentedStream || outStream is ZipSegmentedStream || this._InputUsesZip64 && this._container.UseZip64WhenSaving == Zip64Option.Default || !this._InputUsesZip64 && this._container.UseZip64WhenSaving == Zip64Option.Always) - this.CopyThroughWithRecompute(outStream); - else - this.CopyThroughWithNoChange(outStream); - this._entryRequiresZip64 = new bool?(this._CompressedSize >= (long) uint.MaxValue || this._UncompressedSize >= (long) uint.MaxValue || this._RelativeOffsetOfLocalHeader >= (long) uint.MaxValue); - this._OutputUsesZip64 = new bool?(this._container.Zip64 == Zip64Option.Always || this._entryRequiresZip64.Value); - } - - private void CopyThroughWithRecompute(Stream outstream) - { - byte[] buffer1 = new byte[this.BufferSize]; - CountingStream countingStream = new CountingStream(this.ArchiveStream); - long offsetOfLocalHeader = this._RelativeOffsetOfLocalHeader; - int lengthOfHeader = this.LengthOfHeader; - this.WriteHeader(outstream, 0); - this.StoreRelativeOffset(); - if (!this.FileName.EndsWith("/")) - { - long num = offsetOfLocalHeader + (long) lengthOfHeader; - int cryptoHeaderBytes = ZipEntry.GetLengthOfCryptoHeaderBytes(this._Encryption_FromZipFile); - long offset = num - (long) cryptoHeaderBytes; - this._LengthOfHeader += cryptoHeaderBytes; - countingStream.Seek(offset, SeekOrigin.Begin); - long compressedSize = this._CompressedSize; - while (compressedSize > 0L) - { - int count1 = compressedSize > (long) buffer1.Length ? buffer1.Length : (int) compressedSize; - int count2 = countingStream.Read(buffer1, 0, count1); - outstream.Write(buffer1, 0, count2); - compressedSize -= (long) count2; - this.OnWriteBlock(countingStream.BytesRead, this._CompressedSize); - if (this._ioOperationCanceled) - break; - } - if (((int) this._BitField & 8) == 8) - { - int count = 16; - if (this._InputUsesZip64) - count += 8; - byte[] buffer2 = new byte[count]; - countingStream.Read(buffer2, 0, count); - if (this._InputUsesZip64 && this._container.UseZip64WhenSaving == Zip64Option.Default) - { - outstream.Write(buffer2, 0, 8); - if (this._CompressedSize > (long) uint.MaxValue) - throw new InvalidOperationException("ZIP64 is required"); - outstream.Write(buffer2, 8, 4); - if (this._UncompressedSize > (long) uint.MaxValue) - throw new InvalidOperationException("ZIP64 is required"); - outstream.Write(buffer2, 16, 4); - this._LengthOfTrailer -= 8; - } - else if (!this._InputUsesZip64 && this._container.UseZip64WhenSaving == Zip64Option.Always) - { - byte[] buffer3 = new byte[4]; - outstream.Write(buffer2, 0, 8); - outstream.Write(buffer2, 8, 4); - outstream.Write(buffer3, 0, 4); - outstream.Write(buffer2, 12, 4); - outstream.Write(buffer3, 0, 4); - this._LengthOfTrailer += 8; - } - else - outstream.Write(buffer2, 0, count); - } - } - this._TotalEntrySize = (long) this._LengthOfHeader + this._CompressedFileDataSize + (long) this._LengthOfTrailer; - } - - private void CopyThroughWithNoChange(Stream outstream) - { - byte[] buffer = new byte[this.BufferSize]; - CountingStream countingStream1 = new CountingStream(this.ArchiveStream); - countingStream1.Seek(this._RelativeOffsetOfLocalHeader, SeekOrigin.Begin); - if (this._TotalEntrySize == 0L) - this._TotalEntrySize = (long) this._LengthOfHeader + this._CompressedFileDataSize + (long) this._LengthOfTrailer; - this._RelativeOffsetOfLocalHeader = outstream is CountingStream countingStream2 ? countingStream2.ComputedPosition : outstream.Position; - long totalEntrySize = this._TotalEntrySize; - while (totalEntrySize > 0L) - { - int count1 = totalEntrySize > (long) buffer.Length ? buffer.Length : (int) totalEntrySize; - int count2 = countingStream1.Read(buffer, 0, count1); - outstream.Write(buffer, 0, count2); - totalEntrySize -= (long) count2; - this.OnWriteBlock(countingStream1.BytesRead, this._TotalEntrySize); - if (this._ioOperationCanceled) - break; - } - } - - [Conditional("Trace")] - private void TraceWriteLine(string format, params object[] varParams) - { - lock (this._outputLock) - { - Console.Write("{0:000} ZipEntry.Write ", (object) Thread.CurrentThread.GetHashCode()); - Console.WriteLine(format, varParams); - } - } - - private class CopyHelper - { - private static Regex re = new Regex(" \\(copy (\\d+)\\)$"); - private static int callCount = 0; - - internal static string AppendCopyToFileName(string f) - { - ++ZipEntry.CopyHelper.callCount; - if (ZipEntry.CopyHelper.callCount > 25) - throw new OverflowException("overflow while creating filename"); - int num1 = 1; - int num2 = f.LastIndexOf("."); - if (num2 == -1) - { - Match match = ZipEntry.CopyHelper.re.Match(f); - if (match.Success) - { - string str = string.Format(" (copy {0})", (object) (int.Parse(match.Groups[1].Value) + 1)); - f = f.Substring(0, match.Index) + str; - } - else - { - string str = string.Format(" (copy {0})", (object) num1); - f += str; - } - } - else - { - Match match = ZipEntry.CopyHelper.re.Match(f.Substring(0, num2)); - if (match.Success) - { - string str = string.Format(" (copy {0})", (object) (int.Parse(match.Groups[1].Value) + 1)); - f = f.Substring(0, match.Index) + str + f.Substring(num2); - } - else - { - string str = string.Format(" (copy {0})", (object) num1); - f = f.Substring(0, num2) + str + f.Substring(num2); - } - } - return f; - } - } - - private delegate T Func(); - - private sealed class \u003C\u003Ec__DisplayClass1 - { - public int remainingData; - public byte[] buffer; - public int j; - public long posn; - - public long \u003CProcessExtraFieldZip64\u003Eb__0() - { - if (this.remainingData < 8) - throw new BadReadException(string.Format(" Missing data for ZIP64 extra field, position 0x{0:X16}", (object) this.posn)); - long int64 = BitConverter.ToInt64(this.buffer, this.j); - this.j += 8; - this.remainingData -= 8; - return int64; - } - } - - private sealed class \u003C\u003Ec__DisplayClass4 - { - public int remainingData; - public ZipEntry \u003C\u003E4__this; - public byte[] buffer; - public int j; - - public DateTime \u003CProcessExtraFieldUnixTimes\u003Eb__3() - { - int int32 = BitConverter.ToInt32(this.buffer, this.j); - this.j += 4; - this.remainingData -= 4; - return ZipEntry._unixEpoch.AddSeconds((double) int32); - } - } - } -} diff --git a/Src/IonicZipFiles/Zip/ZipEntrySource.cs b/Src/IonicZipFiles/Zip/ZipEntrySource.cs deleted file mode 100644 index c581aa80..00000000 --- a/Src/IonicZipFiles/Zip/ZipEntrySource.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipEntrySource -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum ZipEntrySource - { - None, - FileSystem, - Stream, - ZipFile, - WriteDelegate, - JitStream, - ZipOutputStream, - } -} diff --git a/Src/IonicZipFiles/Zip/ZipEntryTimestamp.cs b/Src/IonicZipFiles/Zip/ZipEntryTimestamp.cs deleted file mode 100644 index 128e0249..00000000 --- a/Src/IonicZipFiles/Zip/ZipEntryTimestamp.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipEntryTimestamp -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zip -{ - [Flags] - public enum ZipEntryTimestamp - { - None = 0, - DOS = 1, - Windows = 2, - Unix = 4, - InfoZip1 = 8, - } -} diff --git a/Src/IonicZipFiles/Zip/ZipErrorAction.cs b/Src/IonicZipFiles/Zip/ZipErrorAction.cs deleted file mode 100644 index 424f2726..00000000 --- a/Src/IonicZipFiles/Zip/ZipErrorAction.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipErrorAction -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum ZipErrorAction - { - Throw, - Skip, - Retry, - InvokeErrorEvent, - } -} diff --git a/Src/IonicZipFiles/Zip/ZipErrorEventArgs.cs b/Src/IonicZipFiles/Zip/ZipErrorEventArgs.cs deleted file mode 100644 index 2136a5b1..00000000 --- a/Src/IonicZipFiles/Zip/ZipErrorEventArgs.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipErrorEventArgs -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zip -{ - public class ZipErrorEventArgs : ZipProgressEventArgs - { - private Exception _exc; - - private ZipErrorEventArgs() - { - } - - internal static ZipErrorEventArgs Saving( - string archiveName, - ZipEntry entry, - Exception exception) - { - ZipErrorEventArgs zipErrorEventArgs = new ZipErrorEventArgs(); - zipErrorEventArgs.EventType = ZipProgressEventType.Error_Saving; - zipErrorEventArgs.ArchiveName = archiveName; - zipErrorEventArgs.CurrentEntry = entry; - zipErrorEventArgs._exc = exception; - return zipErrorEventArgs; - } - - public Exception Exception => this._exc; - - public string FileName => this.CurrentEntry.LocalFileName; - } -} diff --git a/Src/IonicZipFiles/Zip/ZipException.cs b/Src/IonicZipFiles/Zip/ZipException.cs deleted file mode 100644 index d689dfb5..00000000 --- a/Src/IonicZipFiles/Zip/ZipException.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d00006")] - [Serializable] - public class ZipException : Exception - { - public ZipException() - { - } - - public ZipException(string message) - : base(message) - { - } - - public ZipException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/Src/IonicZipFiles/Zip/ZipFile.cs b/Src/IonicZipFiles/Zip/ZipFile.cs deleted file mode 100644 index dcdbc014..00000000 --- a/Src/IonicZipFiles/Zip/ZipFile.cs +++ /dev/null @@ -1,2018 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipFile -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Zlib; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; - -namespace Ionic.Zip -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d00005")] - [ComVisible(true)] - public class ZipFile : IEnumerable, IEnumerable, IDisposable - { - private TextWriter _StatusMessageTextWriter; - private bool _CaseSensitiveRetrieval; - private Stream _readstream; - private Stream _writestream; - private ushort _versionMadeBy; - private ushort _versionNeededToExtract; - private uint _diskNumberWithCd; - private int _maxOutputSegmentSize; - private uint _numberOfSegmentsForMostRecentSave; - private ZipErrorAction _zipErrorAction; - private bool _disposed; - private Dictionary _entries; - private List _zipEntriesAsList; - private string _name; - private string _readName; - private string _Comment; - internal string _Password; - private bool _emitNtfsTimes = true; - private bool _emitUnixTimes; - private CompressionStrategy _Strategy; - private CompressionMethod _compressionMethod = CompressionMethod.Deflate; - private bool _fileAlreadyExists; - private string _temporaryFileName; - private bool _contentsChanged; - private bool _hasBeenSaved; - private string _TempFileFolder; - private bool _ReadStreamIsOurs = true; - private object LOCK = new object(); - private bool _saveOperationCanceled; - private bool _extractOperationCanceled; - private bool _addOperationCanceled; - private EncryptionAlgorithm _Encryption; - private bool _JustSaved; - private long _locEndOfCDS = -1; - private uint _OffsetOfCentralDirectory; - private long _OffsetOfCentralDirectory64; - private bool? _OutputUsesZip64; - internal bool _inExtractAll; - private Encoding _alternateEncoding = Encoding.GetEncoding("IBM437"); - private ZipOption _alternateEncodingUsage; - private static Encoding _defaultEncoding = Encoding.GetEncoding("IBM437"); - private int _BufferSize = ZipFile.BufferSizeDefault; - internal Zip64Option _zip64; - private bool _SavingSfx; - public static readonly int BufferSizeDefault = 32768; - private long _lengthOfReadStream = -99; - private bool \u003CFullScan\u003Ek__BackingField; - private bool \u003CSortEntriesBeforeSaving\u003Ek__BackingField; - private bool \u003CAddDirectoryWillTraverseReparsePoints\u003Ek__BackingField; - private int \u003CCodecBufferSize\u003Ek__BackingField; - private bool \u003CFlattenFoldersOnExtract\u003Ek__BackingField; - private CompressionLevel \u003CCompressionLevel\u003Ek__BackingField; - private ExtractExistingFileAction \u003CExtractExistingFile\u003Ek__BackingField; - private SetCompressionCallback \u003CSetCompression\u003Ek__BackingField; - - public ZipEntry AddItem(string fileOrDirectoryName) => this.AddItem(fileOrDirectoryName, (string) null); - - public ZipEntry AddItem(string fileOrDirectoryName, string directoryPathInArchive) - { - if (File.Exists(fileOrDirectoryName)) - return this.AddFile(fileOrDirectoryName, directoryPathInArchive); - return Directory.Exists(fileOrDirectoryName) ? this.AddDirectory(fileOrDirectoryName, directoryPathInArchive) : throw new FileNotFoundException(string.Format("That file or directory ({0}) does not exist!", (object) fileOrDirectoryName)); - } - - public ZipEntry AddFile(string fileName) => this.AddFile(fileName, (string) null); - - public ZipEntry AddFile(string fileName, string directoryPathInArchive) - { - string nameInArchive = ZipEntry.NameInArchive(fileName, directoryPathInArchive); - ZipEntry fromFile = ZipEntry.CreateFromFile(fileName, nameInArchive); - if (this.Verbose) - this.StatusMessageTextWriter.WriteLine("adding {0}...", (object) fileName); - return this._InternalAddEntry(fromFile); - } - - public void RemoveEntries(ICollection entriesToRemove) - { - if (entriesToRemove == null) - throw new ArgumentNullException(nameof (entriesToRemove)); - foreach (ZipEntry entry in (IEnumerable) entriesToRemove) - this.RemoveEntry(entry); - } - - public void RemoveEntries(ICollection entriesToRemove) - { - if (entriesToRemove == null) - throw new ArgumentNullException(nameof (entriesToRemove)); - foreach (string fileName in (IEnumerable) entriesToRemove) - this.RemoveEntry(fileName); - } - - public void AddFiles(IEnumerable fileNames) => this.AddFiles(fileNames, (string) null); - - public void UpdateFiles(IEnumerable fileNames) => this.UpdateFiles(fileNames, (string) null); - - public void AddFiles(IEnumerable fileNames, string directoryPathInArchive) => this.AddFiles(fileNames, false, directoryPathInArchive); - - public void AddFiles( - IEnumerable fileNames, - bool preserveDirHierarchy, - string directoryPathInArchive) - { - if (fileNames == null) - throw new ArgumentNullException(nameof (fileNames)); - this._addOperationCanceled = false; - this.OnAddStarted(); - if (preserveDirHierarchy) - { - foreach (string fileName in fileNames) - { - if (!this._addOperationCanceled) - { - if (directoryPathInArchive != null) - { - string fullPath = Path.GetFullPath(Path.Combine(directoryPathInArchive, Path.GetDirectoryName(fileName))); - this.AddFile(fileName, fullPath); - } - else - this.AddFile(fileName, (string) null); - } - else - break; - } - } - else - { - foreach (string fileName in fileNames) - { - if (!this._addOperationCanceled) - this.AddFile(fileName, directoryPathInArchive); - else - break; - } - } - if (this._addOperationCanceled) - return; - this.OnAddCompleted(); - } - - public void UpdateFiles(IEnumerable fileNames, string directoryPathInArchive) - { - if (fileNames == null) - throw new ArgumentNullException(nameof (fileNames)); - this.OnAddStarted(); - foreach (string fileName in fileNames) - this.UpdateFile(fileName, directoryPathInArchive); - this.OnAddCompleted(); - } - - public ZipEntry UpdateFile(string fileName) => this.UpdateFile(fileName, (string) null); - - public ZipEntry UpdateFile(string fileName, string directoryPathInArchive) - { - string fileName1 = ZipEntry.NameInArchive(fileName, directoryPathInArchive); - if (this[fileName1] != null) - this.RemoveEntry(fileName1); - return this.AddFile(fileName, directoryPathInArchive); - } - - public ZipEntry UpdateDirectory(string directoryName) => this.UpdateDirectory(directoryName, (string) null); - - public ZipEntry UpdateDirectory(string directoryName, string directoryPathInArchive) => this.AddOrUpdateDirectoryImpl(directoryName, directoryPathInArchive, AddOrUpdateAction.AddOrUpdate); - - public void UpdateItem(string itemName) => this.UpdateItem(itemName, (string) null); - - public void UpdateItem(string itemName, string directoryPathInArchive) - { - if (File.Exists(itemName)) - { - this.UpdateFile(itemName, directoryPathInArchive); - } - else - { - if (!Directory.Exists(itemName)) - throw new FileNotFoundException(string.Format("That file or directory ({0}) does not exist!", (object) itemName)); - this.UpdateDirectory(itemName, directoryPathInArchive); - } - } - - public ZipEntry AddEntry(string entryName, string content) => this.AddEntry(entryName, content, Encoding.Default); - - public ZipEntry AddEntry(string entryName, string content, Encoding encoding) - { - MemoryStream memoryStream = new MemoryStream(); - StreamWriter streamWriter = new StreamWriter((Stream) memoryStream, encoding); - streamWriter.Write(content); - streamWriter.Flush(); - memoryStream.Seek(0L, SeekOrigin.Begin); - return this.AddEntry(entryName, (Stream) memoryStream); - } - - public ZipEntry AddEntry(string entryName, Stream stream) - { - ZipEntry forStream = ZipEntry.CreateForStream(entryName, stream); - forStream.SetEntryTimes(DateTime.Now, DateTime.Now, DateTime.Now); - if (this.Verbose) - this.StatusMessageTextWriter.WriteLine("adding {0}...", (object) entryName); - return this._InternalAddEntry(forStream); - } - - public ZipEntry AddEntry(string entryName, WriteDelegate writer) - { - ZipEntry forWriter = ZipEntry.CreateForWriter(entryName, writer); - if (this.Verbose) - this.StatusMessageTextWriter.WriteLine("adding {0}...", (object) entryName); - return this._InternalAddEntry(forWriter); - } - - public ZipEntry AddEntry(string entryName, OpenDelegate opener, CloseDelegate closer) - { - ZipEntry jitStreamProvider = ZipEntry.CreateForJitStreamProvider(entryName, opener, closer); - jitStreamProvider.SetEntryTimes(DateTime.Now, DateTime.Now, DateTime.Now); - if (this.Verbose) - this.StatusMessageTextWriter.WriteLine("adding {0}...", (object) entryName); - return this._InternalAddEntry(jitStreamProvider); - } - - private ZipEntry _InternalAddEntry(ZipEntry ze) - { - ze._container = new ZipContainer((object) this); - ze.CompressionMethod = this.CompressionMethod; - ze.CompressionLevel = this.CompressionLevel; - ze.ExtractExistingFile = this.ExtractExistingFile; - ze.ZipErrorAction = this.ZipErrorAction; - ze.SetCompression = this.SetCompression; - ze.AlternateEncoding = this.AlternateEncoding; - ze.AlternateEncodingUsage = this.AlternateEncodingUsage; - ze.Password = this._Password; - ze.Encryption = this.Encryption; - ze.EmitTimesInWindowsFormatWhenSaving = this._emitNtfsTimes; - ze.EmitTimesInUnixFormatWhenSaving = this._emitUnixTimes; - this.InternalAddEntry(ze.FileName, ze); - this.AfterAddEntry(ze); - return ze; - } - - public ZipEntry UpdateEntry(string entryName, string content) => this.UpdateEntry(entryName, content, Encoding.Default); - - public ZipEntry UpdateEntry(string entryName, string content, Encoding encoding) - { - this.RemoveEntryForUpdate(entryName); - return this.AddEntry(entryName, content, encoding); - } - - public ZipEntry UpdateEntry(string entryName, WriteDelegate writer) - { - this.RemoveEntryForUpdate(entryName); - return this.AddEntry(entryName, writer); - } - - public ZipEntry UpdateEntry(string entryName, OpenDelegate opener, CloseDelegate closer) - { - this.RemoveEntryForUpdate(entryName); - return this.AddEntry(entryName, opener, closer); - } - - public ZipEntry UpdateEntry(string entryName, Stream stream) - { - this.RemoveEntryForUpdate(entryName); - return this.AddEntry(entryName, stream); - } - - private void RemoveEntryForUpdate(string entryName) - { - if (string.IsNullOrEmpty(entryName)) - throw new ArgumentNullException(nameof (entryName)); - string directoryPathInArchive = (string) null; - if (entryName.IndexOf('\\') != -1) - { - directoryPathInArchive = Path.GetDirectoryName(entryName); - entryName = Path.GetFileName(entryName); - } - string fileName = ZipEntry.NameInArchive(entryName, directoryPathInArchive); - if (this[fileName] == null) - return; - this.RemoveEntry(fileName); - } - - public ZipEntry AddEntry(string entryName, byte[] byteContent) - { - MemoryStream memoryStream = byteContent != null ? new MemoryStream(byteContent) : throw new ArgumentException("bad argument", nameof (byteContent)); - return this.AddEntry(entryName, (Stream) memoryStream); - } - - public ZipEntry UpdateEntry(string entryName, byte[] byteContent) - { - this.RemoveEntryForUpdate(entryName); - return this.AddEntry(entryName, byteContent); - } - - public ZipEntry AddDirectory(string directoryName) => this.AddDirectory(directoryName, (string) null); - - public ZipEntry AddDirectory(string directoryName, string directoryPathInArchive) => this.AddOrUpdateDirectoryImpl(directoryName, directoryPathInArchive, AddOrUpdateAction.AddOnly); - - public ZipEntry AddDirectoryByName(string directoryNameInArchive) - { - ZipEntry fromNothing = ZipEntry.CreateFromNothing(directoryNameInArchive); - fromNothing._container = new ZipContainer((object) this); - fromNothing.MarkAsDirectory(); - fromNothing.AlternateEncoding = this.AlternateEncoding; - fromNothing.AlternateEncodingUsage = this.AlternateEncodingUsage; - fromNothing.SetEntryTimes(DateTime.Now, DateTime.Now, DateTime.Now); - fromNothing.EmitTimesInWindowsFormatWhenSaving = this._emitNtfsTimes; - fromNothing.EmitTimesInUnixFormatWhenSaving = this._emitUnixTimes; - fromNothing._Source = ZipEntrySource.Stream; - this.InternalAddEntry(fromNothing.FileName, fromNothing); - this.AfterAddEntry(fromNothing); - return fromNothing; - } - - private ZipEntry AddOrUpdateDirectoryImpl( - string directoryName, - string rootDirectoryPathInArchive, - AddOrUpdateAction action) - { - if (rootDirectoryPathInArchive == null) - rootDirectoryPathInArchive = ""; - return this.AddOrUpdateDirectoryImpl(directoryName, rootDirectoryPathInArchive, action, true, 0); - } - - internal void InternalAddEntry(string name, ZipEntry entry) - { - this._entries.Add(name, entry); - this._zipEntriesAsList = (List) null; - this._contentsChanged = true; - } - - private ZipEntry AddOrUpdateDirectoryImpl( - string directoryName, - string rootDirectoryPathInArchive, - AddOrUpdateAction action, - bool recurse, - int level) - { - if (this.Verbose) - this.StatusMessageTextWriter.WriteLine("{0} {1}...", action == AddOrUpdateAction.AddOnly ? (object) "adding" : (object) "Adding or updating", (object) directoryName); - if (level == 0) - { - this._addOperationCanceled = false; - this.OnAddStarted(); - } - if (this._addOperationCanceled) - return (ZipEntry) null; - string str = rootDirectoryPathInArchive; - ZipEntry entry = (ZipEntry) null; - if (level > 0) - { - int num = directoryName.Length; - for (int index = level; index > 0; --index) - num = directoryName.LastIndexOfAny("/\\".ToCharArray(), num - 1, num - 1); - string path2 = directoryName.Substring(num + 1); - str = Path.Combine(rootDirectoryPathInArchive, path2); - } - if (level > 0 || rootDirectoryPathInArchive != "") - { - entry = ZipEntry.CreateFromFile(directoryName, str); - entry._container = new ZipContainer((object) this); - entry.AlternateEncoding = this.AlternateEncoding; - entry.AlternateEncodingUsage = this.AlternateEncodingUsage; - entry.MarkAsDirectory(); - entry.EmitTimesInWindowsFormatWhenSaving = this._emitNtfsTimes; - entry.EmitTimesInUnixFormatWhenSaving = this._emitUnixTimes; - if (!this._entries.ContainsKey(entry.FileName)) - { - this.InternalAddEntry(entry.FileName, entry); - this.AfterAddEntry(entry); - } - str = entry.FileName; - } - if (!this._addOperationCanceled) - { - string[] files = Directory.GetFiles(directoryName); - if (recurse) - { - foreach (string fileName in files) - { - if (!this._addOperationCanceled) - { - if (action == AddOrUpdateAction.AddOnly) - this.AddFile(fileName, str); - else - this.UpdateFile(fileName, str); - } - else - break; - } - if (!this._addOperationCanceled) - { - foreach (string directory in Directory.GetDirectories(directoryName)) - { - FileAttributes attributes = (FileAttributes) NetCfFile.GetAttributes(directory); - if (this.AddDirectoryWillTraverseReparsePoints || (attributes & FileAttributes.ReparsePoint) == (FileAttributes) 0) - this.AddOrUpdateDirectoryImpl(directory, rootDirectoryPathInArchive, action, recurse, level + 1); - } - } - } - } - if (level == 0) - this.OnAddCompleted(); - return entry; - } - - public static bool CheckZip(string zipFileName) => ZipFile.CheckZip(zipFileName, false, (TextWriter) null); - - public static bool CheckZip(string zipFileName, bool fixIfNecessary, TextWriter writer) - { - ZipFile zipFile1 = (ZipFile) null; - ZipFile zipFile2 = (ZipFile) null; - bool flag = true; - try - { - zipFile1 = new ZipFile(); - zipFile1.FullScan = true; - zipFile1.Initialize(zipFileName); - zipFile2 = ZipFile.Read(zipFileName); - foreach (ZipEntry zipEntry1 in zipFile1) - { - foreach (ZipEntry zipEntry2 in zipFile2) - { - if (zipEntry1.FileName == zipEntry2.FileName) - { - if (zipEntry1._RelativeOffsetOfLocalHeader != zipEntry2._RelativeOffsetOfLocalHeader) - { - flag = false; - writer?.WriteLine("{0}: mismatch in RelativeOffsetOfLocalHeader (0x{1:X16} != 0x{2:X16})", new object[3] - { - (object) zipEntry1.FileName, - (object) zipEntry1._RelativeOffsetOfLocalHeader, - (object) zipEntry2._RelativeOffsetOfLocalHeader - }); - } - if (zipEntry1._CompressedSize != zipEntry2._CompressedSize) - { - flag = false; - writer?.WriteLine("{0}: mismatch in CompressedSize (0x{1:X16} != 0x{2:X16})", new object[3] - { - (object) zipEntry1.FileName, - (object) zipEntry1._CompressedSize, - (object) zipEntry2._CompressedSize - }); - } - if (zipEntry1._UncompressedSize != zipEntry2._UncompressedSize) - { - flag = false; - writer?.WriteLine("{0}: mismatch in UncompressedSize (0x{1:X16} != 0x{2:X16})", new object[3] - { - (object) zipEntry1.FileName, - (object) zipEntry1._UncompressedSize, - (object) zipEntry2._UncompressedSize - }); - } - if (zipEntry1.CompressionMethod != zipEntry2.CompressionMethod) - { - flag = false; - writer?.WriteLine("{0}: mismatch in CompressionMethod (0x{1:X4} != 0x{2:X4})", new object[3] - { - (object) zipEntry1.FileName, - (object) zipEntry1.CompressionMethod, - (object) zipEntry2.CompressionMethod - }); - } - if (zipEntry1.Crc != zipEntry2.Crc) - { - flag = false; - if (writer != null) - { - writer.WriteLine("{0}: mismatch in Crc32 (0x{1:X4} != 0x{2:X4})", new object[3] - { - (object) zipEntry1.FileName, - (object) zipEntry1.Crc, - (object) zipEntry2.Crc - }); - break; - } - break; - } - break; - } - } - } - zipFile2.Dispose(); - zipFile2 = (ZipFile) null; - if (!flag) - { - if (fixIfNecessary) - { - string fileName = string.Format("{0}_fixed.zip", (object) Path.GetFileNameWithoutExtension(zipFileName)); - zipFile1.Save(fileName); - } - } - } - finally - { - zipFile1?.Dispose(); - zipFile2?.Dispose(); - } - return flag; - } - - public static void FixZipDirectory(string zipFileName) - { - using (ZipFile zipFile = new ZipFile()) - { - zipFile.FullScan = true; - zipFile.Initialize(zipFileName); - zipFile.Save(zipFileName); - } - } - - public static bool CheckZipPassword(string zipFileName, string password) - { - bool flag = false; - try - { - using (ZipFile zipFile = ZipFile.Read(zipFileName)) - { - foreach (ZipEntry zipEntry in zipFile) - { - if (!zipEntry.IsDirectory && zipEntry.UsesEncryption) - zipEntry.ExtractWithPassword(Stream.Null, password); - } - } - flag = true; - } - catch (BadPasswordException ex) - { - } - return flag; - } - - public string Info - { - get - { - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.Append(string.Format(" ZipFile: {0}\n", (object) this.Name)); - if (!string.IsNullOrEmpty(this._Comment)) - stringBuilder.Append(string.Format(" Comment: {0}\n", (object) this._Comment)); - if (this._versionMadeBy != (ushort) 0) - stringBuilder.Append(string.Format(" version made by: 0x{0:X4}\n", (object) this._versionMadeBy)); - if (this._versionNeededToExtract != (ushort) 0) - stringBuilder.Append(string.Format("needed to extract: 0x{0:X4}\n", (object) this._versionNeededToExtract)); - stringBuilder.Append(string.Format(" uses ZIP64: {0}\n", (object) this.InputUsesZip64)); - stringBuilder.Append(string.Format(" disk with CD: {0}\n", (object) this._diskNumberWithCd)); - if (this._OffsetOfCentralDirectory == uint.MaxValue) - stringBuilder.Append(string.Format(" CD64 offset: 0x{0:X16}\n", (object) this._OffsetOfCentralDirectory64)); - else - stringBuilder.Append(string.Format(" CD offset: 0x{0:X8}\n", (object) this._OffsetOfCentralDirectory)); - stringBuilder.Append("\n"); - foreach (ZipEntry zipEntry in this._entries.Values) - stringBuilder.Append(zipEntry.Info); - return stringBuilder.ToString(); - } - } - - public bool FullScan - { - get => this.\u003CFullScan\u003Ek__BackingField; - set => this.\u003CFullScan\u003Ek__BackingField = value; - } - - public bool SortEntriesBeforeSaving - { - get => this.\u003CSortEntriesBeforeSaving\u003Ek__BackingField; - set => this.\u003CSortEntriesBeforeSaving\u003Ek__BackingField = value; - } - - public bool AddDirectoryWillTraverseReparsePoints - { - get => this.\u003CAddDirectoryWillTraverseReparsePoints\u003Ek__BackingField; - set => this.\u003CAddDirectoryWillTraverseReparsePoints\u003Ek__BackingField = value; - } - - public int BufferSize - { - get => this._BufferSize; - set => this._BufferSize = value; - } - - public int CodecBufferSize - { - get => this.\u003CCodecBufferSize\u003Ek__BackingField; - set => this.\u003CCodecBufferSize\u003Ek__BackingField = value; - } - - public bool FlattenFoldersOnExtract - { - get => this.\u003CFlattenFoldersOnExtract\u003Ek__BackingField; - set => this.\u003CFlattenFoldersOnExtract\u003Ek__BackingField = value; - } - - public CompressionStrategy Strategy - { - get => this._Strategy; - set => this._Strategy = value; - } - - public string Name - { - get => this._name; - set => this._name = value; - } - - public CompressionLevel CompressionLevel - { - get => this.\u003CCompressionLevel\u003Ek__BackingField; - set => this.\u003CCompressionLevel\u003Ek__BackingField = value; - } - - public CompressionMethod CompressionMethod - { - get => this._compressionMethod; - set => this._compressionMethod = value; - } - - public string Comment - { - get => this._Comment; - set - { - this._Comment = value; - this._contentsChanged = true; - } - } - - public bool EmitTimesInWindowsFormatWhenSaving - { - get => this._emitNtfsTimes; - set => this._emitNtfsTimes = value; - } - - public bool EmitTimesInUnixFormatWhenSaving - { - get => this._emitUnixTimes; - set => this._emitUnixTimes = value; - } - - internal bool Verbose => this._StatusMessageTextWriter != null; - - public bool ContainsEntry(string name) => this._entries.ContainsKey(SharedUtilities.NormalizePathForUseInZipFile(name)); - - public bool CaseSensitiveRetrieval - { - get => this._CaseSensitiveRetrieval; - set - { - if (value == this._CaseSensitiveRetrieval) - return; - this._CaseSensitiveRetrieval = value; - this._initEntriesDictionary(); - } - } - - [Obsolete("Beginning with v1.9.1.6 of DotNetZip, this property is obsolete. It will be removed in a future version of the library. Your applications should use AlternateEncoding and AlternateEncodingUsage instead.")] - public bool UseUnicodeAsNecessary - { - get => this._alternateEncoding == Encoding.GetEncoding("UTF-8") && this._alternateEncodingUsage == ZipOption.AsNecessary; - set - { - if (value) - { - this._alternateEncoding = Encoding.GetEncoding("UTF-8"); - this._alternateEncodingUsage = ZipOption.AsNecessary; - } - else - { - this._alternateEncoding = ZipFile.DefaultEncoding; - this._alternateEncodingUsage = ZipOption.Default; - } - } - } - - public Zip64Option UseZip64WhenSaving - { - get => this._zip64; - set => this._zip64 = value; - } - - public bool? RequiresZip64 - { - get - { - if (this._entries.Count > 65534) - return new bool?(true); - if (!this._hasBeenSaved || this._contentsChanged) - return new bool?(); - foreach (ZipEntry zipEntry in this._entries.Values) - { - if (zipEntry.RequiresZip64.Value) - return new bool?(true); - } - return new bool?(false); - } - } - - public bool? OutputUsedZip64 => this._OutputUsesZip64; - - public bool? InputUsesZip64 - { - get - { - if (this._entries.Count > 65534) - return new bool?(true); - foreach (ZipEntry zipEntry in this) - { - if (zipEntry.Source != ZipEntrySource.ZipFile) - return new bool?(); - if (zipEntry._InputUsesZip64) - return new bool?(true); - } - return new bool?(false); - } - } - - [Obsolete("use AlternateEncoding instead.")] - public Encoding ProvisionalAlternateEncoding - { - get => this._alternateEncodingUsage == ZipOption.AsNecessary ? this._alternateEncoding : (Encoding) null; - set - { - this._alternateEncoding = value; - this._alternateEncodingUsage = ZipOption.AsNecessary; - } - } - - public Encoding AlternateEncoding - { - get => this._alternateEncoding; - set => this._alternateEncoding = value; - } - - public ZipOption AlternateEncodingUsage - { - get => this._alternateEncodingUsage; - set => this._alternateEncodingUsage = value; - } - - public static Encoding DefaultEncoding => ZipFile._defaultEncoding; - - public TextWriter StatusMessageTextWriter - { - get => this._StatusMessageTextWriter; - set => this._StatusMessageTextWriter = value; - } - - public string TempFileFolder - { - get => this._TempFileFolder; - set - { - this._TempFileFolder = value; - if (value != null && !Directory.Exists(value)) - throw new FileNotFoundException(string.Format("That directory ({0}) does not exist.", (object) value)); - } - } - - public string Password - { - set - { - this._Password = value; - if (this._Password == null) - { - this.Encryption = EncryptionAlgorithm.None; - } - else - { - if (this.Encryption != EncryptionAlgorithm.None) - return; - this.Encryption = EncryptionAlgorithm.PkzipWeak; - } - } - private get => this._Password; - } - - public ExtractExistingFileAction ExtractExistingFile - { - get => this.\u003CExtractExistingFile\u003Ek__BackingField; - set => this.\u003CExtractExistingFile\u003Ek__BackingField = value; - } - - public ZipErrorAction ZipErrorAction - { - get - { - if (this.ZipError != null) - this._zipErrorAction = ZipErrorAction.InvokeErrorEvent; - return this._zipErrorAction; - } - set - { - this._zipErrorAction = value; - if (this._zipErrorAction == ZipErrorAction.InvokeErrorEvent || this.ZipError == null) - return; - this.ZipError = (EventHandler) null; - } - } - - public EncryptionAlgorithm Encryption - { - get => this._Encryption; - set => this._Encryption = value != EncryptionAlgorithm.Unsupported ? value : throw new InvalidOperationException("You may not set Encryption to that value."); - } - - public SetCompressionCallback SetCompression - { - get => this.\u003CSetCompression\u003Ek__BackingField; - set => this.\u003CSetCompression\u003Ek__BackingField = value; - } - - public int MaxOutputSegmentSize - { - get => this._maxOutputSegmentSize; - set => this._maxOutputSegmentSize = value >= 65536 || value == 0 ? value : throw new ZipException("The minimum acceptable segment size is 65536."); - } - - public int NumberOfSegmentsForMostRecentSave => (int) this._numberOfSegmentsForMostRecentSave + 1; - - public override string ToString() => string.Format("ZipFile::{0}", (object) this.Name); - - public static Version LibraryVersion => Assembly.GetExecutingAssembly().GetName().Version; - - internal void NotifyEntryChanged() => this._contentsChanged = true; - - internal Stream StreamForDiskNumber(uint diskNumber) => (int) diskNumber + 1 == (int) this._diskNumberWithCd || diskNumber == 0U && this._diskNumberWithCd == 0U ? this.ReadStream : (Stream) ZipSegmentedStream.ForReading(this._readName ?? this._name, diskNumber, this._diskNumberWithCd); - - internal void Reset(bool whileSaving) - { - if (!this._JustSaved) - return; - using (ZipFile zf = new ZipFile()) - { - zf._readName = zf._name = whileSaving ? this._readName ?? this._name : this._name; - zf.AlternateEncoding = this.AlternateEncoding; - zf.AlternateEncodingUsage = this.AlternateEncodingUsage; - ZipFile.ReadIntoInstance(zf); - foreach (ZipEntry source in zf) - { - foreach (ZipEntry zipEntry in this) - { - if (source.FileName == zipEntry.FileName) - { - zipEntry.CopyMetaData(source); - break; - } - } - } - } - this._JustSaved = false; - } - - public ZipFile(string fileName) - { - try - { - this._InitInstance(fileName, (TextWriter) null); - } - catch (Exception ex) - { - throw new ZipException(string.Format("Could not read {0} as a zip file", (object) fileName), ex); - } - } - - public ZipFile(string fileName, Encoding encoding) - { - try - { - this.AlternateEncoding = encoding; - this.AlternateEncodingUsage = ZipOption.Always; - this._InitInstance(fileName, (TextWriter) null); - } - catch (Exception ex) - { - throw new ZipException(string.Format("{0} is not a valid zip file", (object) fileName), ex); - } - } - - public ZipFile() => this._InitInstance((string) null, (TextWriter) null); - - public ZipFile(Encoding encoding) - { - this.AlternateEncoding = encoding; - this.AlternateEncodingUsage = ZipOption.Always; - this._InitInstance((string) null, (TextWriter) null); - } - - public ZipFile(string fileName, TextWriter statusMessageWriter) - { - try - { - this._InitInstance(fileName, statusMessageWriter); - } - catch (Exception ex) - { - throw new ZipException(string.Format("{0} is not a valid zip file", (object) fileName), ex); - } - } - - public ZipFile(string fileName, TextWriter statusMessageWriter, Encoding encoding) - { - try - { - this.AlternateEncoding = encoding; - this.AlternateEncodingUsage = ZipOption.Always; - this._InitInstance(fileName, statusMessageWriter); - } - catch (Exception ex) - { - throw new ZipException(string.Format("{0} is not a valid zip file", (object) fileName), ex); - } - } - - public void Initialize(string fileName) - { - try - { - this._InitInstance(fileName, (TextWriter) null); - } - catch (Exception ex) - { - throw new ZipException(string.Format("{0} is not a valid zip file", (object) fileName), ex); - } - } - - private void _initEntriesDictionary() - { - StringComparer comparer = this.CaseSensitiveRetrieval ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase; - this._entries = this._entries == null ? new Dictionary((IEqualityComparer) comparer) : new Dictionary((IDictionary) this._entries, (IEqualityComparer) comparer); - } - - private void _InitInstance(string zipFileName, TextWriter statusMessageWriter) - { - this._name = zipFileName; - this._StatusMessageTextWriter = statusMessageWriter; - this._contentsChanged = true; - this.AddDirectoryWillTraverseReparsePoints = true; - this.CompressionLevel = CompressionLevel.Default; - this._initEntriesDictionary(); - if (!File.Exists(this._name)) - return; - if (this.FullScan) - ZipFile.ReadIntoInstance_Orig(this); - else - ZipFile.ReadIntoInstance(this); - this._fileAlreadyExists = true; - } - - private List ZipEntriesAsList - { - get - { - if (this._zipEntriesAsList == null) - this._zipEntriesAsList = new List((IEnumerable) this._entries.Values); - return this._zipEntriesAsList; - } - } - - public ZipEntry this[int ix] => this.ZipEntriesAsList[ix]; - - public ZipEntry this[string fileName] - { - get - { - string key1 = SharedUtilities.NormalizePathForUseInZipFile(fileName); - if (this._entries.ContainsKey(key1)) - return this._entries[key1]; - string key2 = key1.Replace("/", "\\"); - return this._entries.ContainsKey(key2) ? this._entries[key2] : (ZipEntry) null; - } - } - - public ICollection EntryFileNames => (ICollection) this._entries.Keys; - - public ICollection Entries => (ICollection) this._entries.Values; - - public ICollection EntriesSorted - { - get - { - ZipFile.\u003C\u003Ec__DisplayClass1 cDisplayClass1 = new ZipFile.\u003C\u003Ec__DisplayClass1(); - List zipEntryList = new List(); - foreach (ZipEntry entry in (IEnumerable) this.Entries) - zipEntryList.Add(entry); - cDisplayClass1.sc = this.CaseSensitiveRetrieval ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase; - zipEntryList.Sort(new Comparison(cDisplayClass1.\u003Cget_EntriesSorted\u003Eb__0)); - return (ICollection) zipEntryList.AsReadOnly(); - } - } - - public int Count => this._entries.Count; - - public void RemoveEntry(ZipEntry entry) - { - if (entry == null) - throw new ArgumentNullException(nameof (entry)); - this._entries.Remove(SharedUtilities.NormalizePathForUseInZipFile(entry.FileName)); - this._zipEntriesAsList = (List) null; - this._contentsChanged = true; - } - - public void RemoveEntry(string fileName) => this.RemoveEntry(this[ZipEntry.NameInArchive(fileName, (string) null)] ?? throw new ArgumentException("The entry you specified was not found in the zip archive.")); - - public void Dispose() - { - this.Dispose(true); - GC.SuppressFinalize((object) this); - } - - protected virtual void Dispose(bool disposeManagedResources) - { - if (this._disposed) - return; - if (disposeManagedResources) - { - if (this._ReadStreamIsOurs && this._readstream != null) - { - this._readstream.Close(); - this._readstream = (Stream) null; - } - if (this._temporaryFileName != null && this._name != null && this._writestream != null) - { - this._writestream.Close(); - this._writestream = (Stream) null; - } - } - this._disposed = true; - } - - internal Stream ReadStream - { - get - { - if (this._readstream == null && (this._readName != null || this._name != null)) - { - this._readstream = (Stream) File.Open(this._readName ?? this._name, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - this._ReadStreamIsOurs = true; - } - return this._readstream; - } - } - - private Stream WriteStream - { - get - { - if (this._writestream != null || this._name == null) - return this._writestream; - if (this._maxOutputSegmentSize != 0) - { - this._writestream = (Stream) ZipSegmentedStream.ForWriting(this._name, this._maxOutputSegmentSize); - return this._writestream; - } - SharedUtilities.CreateAndOpenUniqueTempFile(this.TempFileFolder ?? Path.GetDirectoryName(this._name), out this._writestream, out this._temporaryFileName); - return this._writestream; - } - set - { - if (value != null) - throw new ZipException("Cannot set the stream to a non-null value."); - this._writestream = (Stream) null; - } - } - - private string ArchiveNameForEvent => this._name == null ? "(stream)" : this._name; - - public event EventHandler SaveProgress; - - internal bool OnSaveBlock(ZipEntry entry, long bytesXferred, long totalBytesToXfer) - { - EventHandler saveProgress = this.SaveProgress; - if (saveProgress != null) - { - SaveProgressEventArgs e = SaveProgressEventArgs.ByteUpdate(this.ArchiveNameForEvent, entry, bytesXferred, totalBytesToXfer); - saveProgress((object) this, e); - if (e.Cancel) - this._saveOperationCanceled = true; - } - return this._saveOperationCanceled; - } - - private void OnSaveEntry(int current, ZipEntry entry, bool before) - { - EventHandler saveProgress = this.SaveProgress; - if (saveProgress == null) - return; - SaveProgressEventArgs e = new SaveProgressEventArgs(this.ArchiveNameForEvent, before, this._entries.Count, current, entry); - saveProgress((object) this, e); - if (!e.Cancel) - return; - this._saveOperationCanceled = true; - } - - private void OnSaveEvent(ZipProgressEventType eventFlavor) - { - EventHandler saveProgress = this.SaveProgress; - if (saveProgress == null) - return; - SaveProgressEventArgs e = new SaveProgressEventArgs(this.ArchiveNameForEvent, eventFlavor); - saveProgress((object) this, e); - if (!e.Cancel) - return; - this._saveOperationCanceled = true; - } - - private void OnSaveStarted() - { - EventHandler saveProgress = this.SaveProgress; - if (saveProgress == null) - return; - SaveProgressEventArgs e = SaveProgressEventArgs.Started(this.ArchiveNameForEvent); - saveProgress((object) this, e); - if (!e.Cancel) - return; - this._saveOperationCanceled = true; - } - - private void OnSaveCompleted() - { - EventHandler saveProgress = this.SaveProgress; - if (saveProgress == null) - return; - SaveProgressEventArgs e = SaveProgressEventArgs.Completed(this.ArchiveNameForEvent); - saveProgress((object) this, e); - } - - public event EventHandler ReadProgress; - - private void OnReadStarted() - { - EventHandler readProgress = this.ReadProgress; - if (readProgress == null) - return; - ReadProgressEventArgs e = ReadProgressEventArgs.Started(this.ArchiveNameForEvent); - readProgress((object) this, e); - } - - private void OnReadCompleted() - { - EventHandler readProgress = this.ReadProgress; - if (readProgress == null) - return; - ReadProgressEventArgs e = ReadProgressEventArgs.Completed(this.ArchiveNameForEvent); - readProgress((object) this, e); - } - - internal void OnReadBytes(ZipEntry entry) - { - EventHandler readProgress = this.ReadProgress; - if (readProgress == null) - return; - ReadProgressEventArgs e = ReadProgressEventArgs.ByteUpdate(this.ArchiveNameForEvent, entry, this.ReadStream.Position, this.LengthOfReadStream); - readProgress((object) this, e); - } - - internal void OnReadEntry(bool before, ZipEntry entry) - { - EventHandler readProgress = this.ReadProgress; - if (readProgress == null) - return; - ReadProgressEventArgs e = before ? ReadProgressEventArgs.Before(this.ArchiveNameForEvent, this._entries.Count) : ReadProgressEventArgs.After(this.ArchiveNameForEvent, entry, this._entries.Count); - readProgress((object) this, e); - } - - private long LengthOfReadStream - { - get - { - if (this._lengthOfReadStream == -99L) - this._lengthOfReadStream = this._ReadStreamIsOurs ? SharedUtilities.GetFileLength(this._name) : -1L; - return this._lengthOfReadStream; - } - } - - public event EventHandler ExtractProgress; - - private void OnExtractEntry(int current, bool before, ZipEntry currentEntry, string path) - { - EventHandler extractProgress = this.ExtractProgress; - if (extractProgress == null) - return; - ExtractProgressEventArgs e = new ExtractProgressEventArgs(this.ArchiveNameForEvent, before, this._entries.Count, current, currentEntry, path); - extractProgress((object) this, e); - if (!e.Cancel) - return; - this._extractOperationCanceled = true; - } - - internal bool OnExtractBlock(ZipEntry entry, long bytesWritten, long totalBytesToWrite) - { - EventHandler extractProgress = this.ExtractProgress; - if (extractProgress != null) - { - ExtractProgressEventArgs e = ExtractProgressEventArgs.ByteUpdate(this.ArchiveNameForEvent, entry, bytesWritten, totalBytesToWrite); - extractProgress((object) this, e); - if (e.Cancel) - this._extractOperationCanceled = true; - } - return this._extractOperationCanceled; - } - - internal bool OnSingleEntryExtract(ZipEntry entry, string path, bool before) - { - EventHandler extractProgress = this.ExtractProgress; - if (extractProgress != null) - { - ExtractProgressEventArgs e = before ? ExtractProgressEventArgs.BeforeExtractEntry(this.ArchiveNameForEvent, entry, path) : ExtractProgressEventArgs.AfterExtractEntry(this.ArchiveNameForEvent, entry, path); - extractProgress((object) this, e); - if (e.Cancel) - this._extractOperationCanceled = true; - } - return this._extractOperationCanceled; - } - - internal bool OnExtractExisting(ZipEntry entry, string path) - { - EventHandler extractProgress = this.ExtractProgress; - if (extractProgress != null) - { - ExtractProgressEventArgs existing = ExtractProgressEventArgs.ExtractExisting(this.ArchiveNameForEvent, entry, path); - extractProgress((object) this, existing); - if (existing.Cancel) - this._extractOperationCanceled = true; - } - return this._extractOperationCanceled; - } - - private void OnExtractAllCompleted(string path) - { - EventHandler extractProgress = this.ExtractProgress; - if (extractProgress == null) - return; - ExtractProgressEventArgs allCompleted = ExtractProgressEventArgs.ExtractAllCompleted(this.ArchiveNameForEvent, path); - extractProgress((object) this, allCompleted); - } - - private void OnExtractAllStarted(string path) - { - EventHandler extractProgress = this.ExtractProgress; - if (extractProgress == null) - return; - ExtractProgressEventArgs allStarted = ExtractProgressEventArgs.ExtractAllStarted(this.ArchiveNameForEvent, path); - extractProgress((object) this, allStarted); - } - - public event EventHandler AddProgress; - - private void OnAddStarted() - { - EventHandler addProgress = this.AddProgress; - if (addProgress == null) - return; - AddProgressEventArgs e = AddProgressEventArgs.Started(this.ArchiveNameForEvent); - addProgress((object) this, e); - if (!e.Cancel) - return; - this._addOperationCanceled = true; - } - - private void OnAddCompleted() - { - EventHandler addProgress = this.AddProgress; - if (addProgress == null) - return; - AddProgressEventArgs e = AddProgressEventArgs.Completed(this.ArchiveNameForEvent); - addProgress((object) this, e); - } - - internal void AfterAddEntry(ZipEntry entry) - { - EventHandler addProgress = this.AddProgress; - if (addProgress == null) - return; - AddProgressEventArgs e = AddProgressEventArgs.AfterEntry(this.ArchiveNameForEvent, entry, this._entries.Count); - addProgress((object) this, e); - if (!e.Cancel) - return; - this._addOperationCanceled = true; - } - - public event EventHandler ZipError; - - internal bool OnZipErrorSaving(ZipEntry entry, Exception exc) - { - if (this.ZipError != null) - { - lock (this.LOCK) - { - ZipErrorEventArgs e = ZipErrorEventArgs.Saving(this.Name, entry, exc); - this.ZipError((object) this, e); - if (e.Cancel) - this._saveOperationCanceled = true; - } - } - return this._saveOperationCanceled; - } - - public void ExtractAll(string path) => this._InternalExtractAll(path, true); - - public void ExtractAll(string path, ExtractExistingFileAction extractExistingFile) - { - this.ExtractExistingFile = extractExistingFile; - this._InternalExtractAll(path, true); - } - - private void _InternalExtractAll(string path, bool overrideExtractExistingProperty) - { - bool flag = this.Verbose; - this._inExtractAll = true; - try - { - this.OnExtractAllStarted(path); - int current = 0; - foreach (ZipEntry currentEntry in this._entries.Values) - { - if (flag) - { - this.StatusMessageTextWriter.WriteLine("\n{1,-22} {2,-8} {3,4} {4,-8} {0}", (object) "Name", (object) "Modified", (object) "Size", (object) "Ratio", (object) "Packed"); - this.StatusMessageTextWriter.WriteLine(new string('-', 72)); - flag = false; - } - if (this.Verbose) - { - this.StatusMessageTextWriter.WriteLine("{1,-22} {2,-8} {3,4:F0}% {4,-8} {0}", (object) currentEntry.FileName, (object) currentEntry.LastModified.ToString("yyyy-MM-dd HH:mm:ss"), (object) currentEntry.UncompressedSize, (object) currentEntry.CompressionRatio, (object) currentEntry.CompressedSize); - if (!string.IsNullOrEmpty(currentEntry.Comment)) - this.StatusMessageTextWriter.WriteLine(" Comment: {0}", (object) currentEntry.Comment); - } - currentEntry.Password = this._Password; - this.OnExtractEntry(current, true, currentEntry, path); - if (overrideExtractExistingProperty) - currentEntry.ExtractExistingFile = this.ExtractExistingFile; - currentEntry.Extract(path); - ++current; - this.OnExtractEntry(current, false, currentEntry, path); - if (this._extractOperationCanceled) - break; - } - if (this._extractOperationCanceled) - return; - foreach (ZipEntry zipEntry in this._entries.Values) - { - if (zipEntry.IsDirectory || zipEntry.FileName.EndsWith("/")) - { - string fileOrDirectory = zipEntry.FileName.StartsWith("/") ? Path.Combine(path, zipEntry.FileName.Substring(1)) : Path.Combine(path, zipEntry.FileName); - zipEntry._SetTimes(fileOrDirectory, false); - } - } - this.OnExtractAllCompleted(path); - } - finally - { - this._inExtractAll = false; - } - } - - public static ZipFile Read(string fileName) => ZipFile.Read(fileName, (TextWriter) null, (Encoding) null, (EventHandler) null); - - public static ZipFile Read(string fileName, ReadOptions options) - { - if (options == null) - throw new ArgumentNullException(nameof (options)); - return ZipFile.Read(fileName, options.StatusMessageWriter, options.Encoding, options.ReadProgress); - } - - private static ZipFile Read( - string fileName, - TextWriter statusMessageWriter, - Encoding encoding, - EventHandler readProgress) - { - ZipFile zf = new ZipFile(); - zf.AlternateEncoding = encoding ?? ZipFile.DefaultEncoding; - zf.AlternateEncodingUsage = ZipOption.Always; - zf._StatusMessageTextWriter = statusMessageWriter; - zf._name = fileName; - if (readProgress != null) - zf.ReadProgress = readProgress; - if (zf.Verbose) - zf._StatusMessageTextWriter.WriteLine("reading from {0}...", (object) fileName); - ZipFile.ReadIntoInstance(zf); - zf._fileAlreadyExists = true; - return zf; - } - - public static ZipFile Read(Stream zipStream) => ZipFile.Read(zipStream, (TextWriter) null, (Encoding) null, (EventHandler) null); - - public static ZipFile Read(Stream zipStream, ReadOptions options) - { - if (options == null) - throw new ArgumentNullException(nameof (options)); - return ZipFile.Read(zipStream, options.StatusMessageWriter, options.Encoding, options.ReadProgress); - } - - private static ZipFile Read( - Stream zipStream, - TextWriter statusMessageWriter, - Encoding encoding, - EventHandler readProgress) - { - if (zipStream == null) - throw new ArgumentNullException(nameof (zipStream)); - ZipFile zf = new ZipFile(); - zf._StatusMessageTextWriter = statusMessageWriter; - zf._alternateEncoding = encoding ?? ZipFile.DefaultEncoding; - zf._alternateEncodingUsage = ZipOption.Always; - if (readProgress != null) - zf.ReadProgress += readProgress; - zf._readstream = zipStream.Position == 0L ? zipStream : (Stream) new OffsetStream(zipStream); - zf._ReadStreamIsOurs = false; - if (zf.Verbose) - zf._StatusMessageTextWriter.WriteLine("reading from stream..."); - ZipFile.ReadIntoInstance(zf); - return zf; - } - - private static void ReadIntoInstance(ZipFile zf) - { - Stream readStream = zf.ReadStream; - try - { - zf._readName = zf._name; - if (!readStream.CanSeek) - { - ZipFile.ReadIntoInstance_Orig(zf); - return; - } - zf.OnReadStarted(); - if (ZipFile.ReadFirstFourBytes(readStream) == 101010256U) - return; - int num1 = 0; - bool flag = false; - long offset = readStream.Length - 64L; - long num2 = Math.Max(readStream.Length - 16384L, 10L); - do - { - if (offset < 0L) - offset = 0L; - readStream.Seek(offset, SeekOrigin.Begin); - if (SharedUtilities.FindSignature(readStream, 101010256) != -1L) - flag = true; - else if (offset != 0L) - { - ++num1; - offset -= (long) (32 * (num1 + 1) * num1); - } - else - break; - } - while (!flag && offset > num2); - if (flag) - { - zf._locEndOfCDS = readStream.Position - 4L; - byte[] buffer = new byte[16]; - readStream.Read(buffer, 0, buffer.Length); - zf._diskNumberWithCd = (uint) BitConverter.ToUInt16(buffer, 2); - if (zf._diskNumberWithCd == (uint) ushort.MaxValue) - throw new ZipException("Spanned archives with more than 65534 segments are not supported at this time."); - ++zf._diskNumberWithCd; - int startIndex = 12; - uint uint32 = BitConverter.ToUInt32(buffer, startIndex); - if (uint32 == uint.MaxValue) - { - ZipFile.Zip64SeekToCentralDirectory(zf); - } - else - { - zf._OffsetOfCentralDirectory = uint32; - readStream.Seek((long) uint32, SeekOrigin.Begin); - } - ZipFile.ReadCentralDirectory(zf); - } - else - { - readStream.Seek(0L, SeekOrigin.Begin); - ZipFile.ReadIntoInstance_Orig(zf); - } - } - catch (Exception ex) - { - if (zf._ReadStreamIsOurs && zf._readstream != null) - { - zf._readstream.Close(); - zf._readstream = (Stream) null; - } - throw new ZipException("Cannot read that as a ZipFile", ex); - } - zf._contentsChanged = false; - } - - private static void Zip64SeekToCentralDirectory(ZipFile zf) - { - Stream readStream = zf.ReadStream; - byte[] buffer1 = new byte[16]; - readStream.Seek(-40L, SeekOrigin.Current); - readStream.Read(buffer1, 0, 16); - long int64_1 = BitConverter.ToInt64(buffer1, 8); - zf._OffsetOfCentralDirectory = uint.MaxValue; - zf._OffsetOfCentralDirectory64 = int64_1; - readStream.Seek(int64_1, SeekOrigin.Begin); - uint num = (uint) SharedUtilities.ReadInt(readStream); - if (num != 101075792U) - throw new BadReadException(string.Format(" Bad signature (0x{0:X8}) looking for ZIP64 EoCD Record at position 0x{1:X8}", (object) num, (object) readStream.Position)); - readStream.Read(buffer1, 0, 8); - byte[] buffer2 = new byte[BitConverter.ToInt64(buffer1, 0)]; - readStream.Read(buffer2, 0, buffer2.Length); - long int64_2 = BitConverter.ToInt64(buffer2, 36); - readStream.Seek(int64_2, SeekOrigin.Begin); - } - - private static uint ReadFirstFourBytes(Stream s) => (uint) SharedUtilities.ReadInt(s); - - private static void ReadCentralDirectory(ZipFile zf) - { - bool flag = false; - Dictionary previouslySeen = new Dictionary(); - ZipEntry zipEntry; - while ((zipEntry = ZipEntry.ReadDirEntry(zf, previouslySeen)) != null) - { - zipEntry.ResetDirEntry(); - zf.OnReadEntry(true, (ZipEntry) null); - if (zf.Verbose) - zf.StatusMessageTextWriter.WriteLine("entry {0}", (object) zipEntry.FileName); - zf._entries.Add(zipEntry.FileName, zipEntry); - if (zipEntry._InputUsesZip64) - flag = true; - previouslySeen.Add(zipEntry.FileName, (object) null); - } - if (flag) - zf.UseZip64WhenSaving = Zip64Option.Always; - if (zf._locEndOfCDS > 0L) - zf.ReadStream.Seek(zf._locEndOfCDS, SeekOrigin.Begin); - ZipFile.ReadCentralDirectoryFooter(zf); - if (zf.Verbose && !string.IsNullOrEmpty(zf.Comment)) - zf.StatusMessageTextWriter.WriteLine("Zip file Comment: {0}", (object) zf.Comment); - if (zf.Verbose) - zf.StatusMessageTextWriter.WriteLine("read in {0} entries.", (object) zf._entries.Count); - zf.OnReadCompleted(); - } - - private static void ReadIntoInstance_Orig(ZipFile zf) - { - zf.OnReadStarted(); - zf._entries = new Dictionary(); - if (zf.Verbose) - { - if (zf.Name == null) - zf.StatusMessageTextWriter.WriteLine("Reading zip from stream..."); - else - zf.StatusMessageTextWriter.WriteLine("Reading zip {0}...", (object) zf.Name); - } - bool first = true; - ZipEntry zipEntry1; - for (ZipContainer zc = new ZipContainer((object) zf); (zipEntry1 = ZipEntry.ReadEntry(zc, first)) != null; first = false) - { - if (zf.Verbose) - zf.StatusMessageTextWriter.WriteLine(" {0}", (object) zipEntry1.FileName); - zf._entries.Add(zipEntry1.FileName, zipEntry1); - } - try - { - Dictionary previouslySeen = new Dictionary(); - ZipEntry zipEntry2; - while ((zipEntry2 = ZipEntry.ReadDirEntry(zf, previouslySeen)) != null) - { - ZipEntry entry = zf._entries[zipEntry2.FileName]; - if (entry != null) - { - entry._Comment = zipEntry2.Comment; - if (zipEntry2.IsDirectory) - entry.MarkAsDirectory(); - } - previouslySeen.Add(zipEntry2.FileName, (object) null); - } - if (zf._locEndOfCDS > 0L) - zf.ReadStream.Seek(zf._locEndOfCDS, SeekOrigin.Begin); - ZipFile.ReadCentralDirectoryFooter(zf); - if (zf.Verbose) - { - if (!string.IsNullOrEmpty(zf.Comment)) - zf.StatusMessageTextWriter.WriteLine("Zip file Comment: {0}", (object) zf.Comment); - } - } - catch (ZipException ex) - { - } - catch (IOException ex) - { - } - zf.OnReadCompleted(); - } - - private static void ReadCentralDirectoryFooter(ZipFile zf) - { - Stream readStream = zf.ReadStream; - int num1 = SharedUtilities.ReadSignature(readStream); - int startIndex1 = 0; - if (num1 == 101075792) - { - byte[] buffer1 = new byte[52]; - readStream.Read(buffer1, 0, buffer1.Length); - long int64 = BitConverter.ToInt64(buffer1, 0); - if (int64 < 44L) - throw new ZipException("Bad size in the ZIP64 Central Directory."); - zf._versionMadeBy = BitConverter.ToUInt16(buffer1, startIndex1); - int startIndex2 = startIndex1 + 2; - zf._versionNeededToExtract = BitConverter.ToUInt16(buffer1, startIndex2); - int startIndex3 = startIndex2 + 2; - zf._diskNumberWithCd = BitConverter.ToUInt32(buffer1, startIndex3); - int num2 = startIndex3 + 2; - byte[] buffer2 = new byte[int64 - 44L]; - readStream.Read(buffer2, 0, buffer2.Length); - if (SharedUtilities.ReadSignature(readStream) != 117853008) - throw new ZipException("Inconsistent metadata in the ZIP64 Central Directory."); - byte[] buffer3 = new byte[16]; - readStream.Read(buffer3, 0, buffer3.Length); - num1 = SharedUtilities.ReadSignature(readStream); - } - if (num1 != 101010256) - { - readStream.Seek(-4L, SeekOrigin.Current); - throw new BadReadException(string.Format("Bad signature ({0:X8}) at position 0x{1:X8}", (object) num1, (object) readStream.Position)); - } - byte[] buffer = new byte[16]; - zf.ReadStream.Read(buffer, 0, buffer.Length); - if (zf._diskNumberWithCd == 0U) - zf._diskNumberWithCd = (uint) BitConverter.ToUInt16(buffer, 2); - ZipFile.ReadZipFileComment(zf); - } - - private static void ReadZipFileComment(ZipFile zf) - { - byte[] buffer = new byte[2]; - zf.ReadStream.Read(buffer, 0, buffer.Length); - short length = (short) ((int) buffer[0] + (int) buffer[1] * 256); - if (length <= (short) 0) - return; - byte[] numArray = new byte[(int) length]; - zf.ReadStream.Read(numArray, 0, numArray.Length); - string str = zf.AlternateEncoding.GetString(numArray, 0, numArray.Length); - zf.Comment = str; - } - - public static bool IsZipFile(string fileName) => ZipFile.IsZipFile(fileName, false); - - public static bool IsZipFile(string fileName, bool testExtract) - { - bool flag = false; - try - { - if (!File.Exists(fileName)) - return false; - using (FileStream fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) - flag = ZipFile.IsZipFile((Stream) fileStream, testExtract); - } - catch (IOException ex) - { - } - catch (ZipException ex) - { - } - return flag; - } - - public static bool IsZipFile(Stream stream, bool testExtract) - { - if (stream == null) - throw new ArgumentNullException(nameof (stream)); - bool flag = false; - try - { - if (!stream.CanRead) - return false; - Stream stream1 = Stream.Null; - using (ZipFile zipFile = ZipFile.Read(stream, (TextWriter) null, (Encoding) null, (EventHandler) null)) - { - if (testExtract) - { - foreach (ZipEntry zipEntry in zipFile) - { - if (!zipEntry.IsDirectory) - zipEntry.Extract(stream1); - } - } - } - flag = true; - } - catch (IOException ex) - { - } - catch (ZipException ex) - { - } - return flag; - } - - private void DeleteFileWithRetry(string filename) - { - bool flag = false; - int num = 3; - for (int index = 0; index < num; ++index) - { - if (flag) - break; - try - { - File.Delete(filename); - flag = true; - } - catch (UnauthorizedAccessException ex) - { - Console.WriteLine("************************************************** Retry delete."); - Thread.Sleep(200 + index * 200); - } - } - } - - public void Save() - { - try - { - bool flag1 = false; - this._saveOperationCanceled = false; - this._numberOfSegmentsForMostRecentSave = 0U; - this.OnSaveStarted(); - if (this.WriteStream == null) - throw new BadStateException("You haven't specified where to save the zip."); - if (this._name != null && this._name.EndsWith(".exe") && !this._SavingSfx) - throw new BadStateException("You specified an EXE for a plain zip file."); - if (!this._contentsChanged) - { - this.OnSaveCompleted(); - if (!this.Verbose) - return; - this.StatusMessageTextWriter.WriteLine("No save is necessary...."); - } - else - { - this.Reset(true); - if (this.Verbose) - this.StatusMessageTextWriter.WriteLine("saving...."); - if (this._entries.Count >= (int) ushort.MaxValue && this._zip64 == Zip64Option.Default) - throw new ZipException("The number of entries is 65535 or greater. Consider setting the UseZip64WhenSaving property on the ZipFile instance."); - int current = 0; - ICollection zipEntries = this.SortEntriesBeforeSaving ? this.EntriesSorted : this.Entries; - foreach (ZipEntry entry in (IEnumerable) zipEntries) - { - this.OnSaveEntry(current, entry, true); - entry.Write(this.WriteStream); - if (!this._saveOperationCanceled) - { - ++current; - this.OnSaveEntry(current, entry, false); - if (!this._saveOperationCanceled) - { - if (entry.IncludedInMostRecentSave) - flag1 |= entry.OutputUsedZip64.Value; - } - else - break; - } - else - break; - } - if (this._saveOperationCanceled) - return; - this._numberOfSegmentsForMostRecentSave = this.WriteStream is ZipSegmentedStream writeStream ? writeStream.CurrentSegment : 1U; - bool flag2 = ZipOutput.WriteCentralDirectoryStructure(this.WriteStream, zipEntries, this._numberOfSegmentsForMostRecentSave, this._zip64, this.Comment, new ZipContainer((object) this)); - this.OnSaveEvent(ZipProgressEventType.Saving_AfterSaveTempArchive); - this._hasBeenSaved = true; - this._contentsChanged = false; - this._OutputUsesZip64 = new bool?(flag1 | flag2); - if (this._name != null && (this._temporaryFileName != null || writeStream != null)) - { - this.WriteStream.Close(); - if (this._saveOperationCanceled) - return; - if (this._fileAlreadyExists && this._readstream != null) - { - this._readstream.Close(); - this._readstream = (Stream) null; - foreach (ZipEntry zipEntry in (IEnumerable) zipEntries) - { - if (zipEntry._archiveStream is ZipSegmentedStream archiveStream) - archiveStream.Close(); - zipEntry._archiveStream = (Stream) null; - } - } - string str = (string) null; - if (File.Exists(this._name)) - { - str = this._name + "." + SharedUtilities.GenerateRandomStringImpl(8, 0) + ".tmp"; - if (File.Exists(str)) - this.DeleteFileWithRetry(str); - File.Move(this._name, str); - } - this.OnSaveEvent(ZipProgressEventType.Saving_BeforeRenameTempArchive); - File.Move(writeStream != null ? writeStream.CurrentTempName : this._temporaryFileName, this._name); - this.OnSaveEvent(ZipProgressEventType.Saving_AfterRenameTempArchive); - if (str != null) - { - try - { - if (File.Exists(str)) - File.Delete(str); - } - catch - { - } - } - this._fileAlreadyExists = true; - } - ZipFile.NotifyEntriesSaveComplete(zipEntries); - this.OnSaveCompleted(); - this._JustSaved = true; - } - } - finally - { - this.CleanupAfterSaveOperation(); - } - } - - private static void NotifyEntriesSaveComplete(ICollection c) - { - foreach (ZipEntry zipEntry in (IEnumerable) c) - zipEntry.NotifySaveComplete(); - } - - private void RemoveTempFile() - { - try - { - if (!File.Exists(this._temporaryFileName)) - return; - File.Delete(this._temporaryFileName); - } - catch (IOException ex) - { - if (!this.Verbose) - return; - this.StatusMessageTextWriter.WriteLine("ZipFile::Save: could not delete temp file: {0}.", (object) ex.Message); - } - } - - private void CleanupAfterSaveOperation() - { - if (this._name == null) - return; - if (this._writestream != null) - { - try - { - this._writestream.Close(); - } - catch (IOException ex) - { - } - } - this._writestream = (Stream) null; - if (this._temporaryFileName == null) - return; - this.RemoveTempFile(); - this._temporaryFileName = (string) null; - } - - public void Save(string fileName) - { - if (this._name == null) - this._writestream = (Stream) null; - else - this._readName = this._name; - this._name = fileName; - if (Directory.Exists(this._name)) - throw new ZipException("Bad Directory", (Exception) new ArgumentException("That name specifies an existing directory. Please specify a filename.", nameof (fileName))); - this._contentsChanged = true; - this._fileAlreadyExists = File.Exists(this._name); - this.Save(); - } - - public void Save(Stream outputStream) - { - if (outputStream == null) - throw new ArgumentNullException(nameof (outputStream)); - if (!outputStream.CanWrite) - throw new ArgumentException("Must be a writable stream.", nameof (outputStream)); - this._name = (string) null; - this._writestream = (Stream) new CountingStream(outputStream); - this._contentsChanged = true; - this._fileAlreadyExists = false; - this.Save(); - } - - public IEnumerator GetEnumerator() => (IEnumerator) new ZipFile.\u003CGetEnumerator\u003Ed__3(0) - { - \u003C\u003E4__this = this - }; - - IEnumerator IEnumerable.GetEnumerator() => (IEnumerator) this.GetEnumerator(); - - [DispId(-4)] - public IEnumerator GetNewEnum() => (IEnumerator) this.GetEnumerator(); - - private sealed class \u003C\u003Ec__DisplayClass1 - { - public StringComparison sc; - - public int \u003Cget_EntriesSorted\u003Eb__0(ZipEntry x, ZipEntry y) => string.Compare(x.FileName, y.FileName, this.sc); - } - - private sealed class \u003CGetEnumerator\u003Ed__3 : - IEnumerator, - IEnumerator, - IDisposable - { - private ZipEntry \u003C\u003E2__current; - private int \u003C\u003E1__state; - public ZipFile \u003C\u003E4__this; - public ZipEntry \u003Ce\u003E5__4; - public Dictionary.ValueCollection.Enumerator \u003C\u003E7__wrap5; - - bool IEnumerator.MoveNext() - { - // ISSUE: fault handler - try - { - switch (this.\u003C\u003E1__state) - { - case 0: - this.\u003C\u003E1__state = -1; - this.\u003C\u003E7__wrap5 = this.\u003C\u003E4__this._entries.Values.GetEnumerator(); - this.\u003C\u003E1__state = 1; - break; - case 2: - this.\u003C\u003E1__state = 1; - break; - default: -label_6: - return false; - } - if (this.\u003C\u003E7__wrap5.MoveNext()) - { - this.\u003Ce\u003E5__4 = this.\u003C\u003E7__wrap5.Current; - this.\u003C\u003E2__current = this.\u003Ce\u003E5__4; - this.\u003C\u003E1__state = 2; - return true; - } - this.\u003C\u003Em__Finally6(); - goto label_6; - } - __fault - { - this.System\u002EIDisposable\u002EDispose(); - } - } - - ZipEntry IEnumerator.Current - { - [DebuggerHidden] get => this.\u003C\u003E2__current; - } - - [DebuggerHidden] - void IEnumerator.Reset() => throw new NotSupportedException(); - - void IDisposable.Dispose() - { - switch (this.\u003C\u003E1__state) - { - case 1: - case 2: - try - { - } - finally - { - this.\u003C\u003Em__Finally6(); - } - break; - } - } - - object IEnumerator.Current - { - [DebuggerHidden] get => (object) this.\u003C\u003E2__current; - } - - [DebuggerHidden] - public \u003CGetEnumerator\u003Ed__3(int _param1) => this.\u003C\u003E1__state = _param1; - - private void \u003C\u003Em__Finally6() - { - this.\u003C\u003E1__state = -1; - this.\u003C\u003E7__wrap5.Dispose(); - } - } - } -} diff --git a/Src/IonicZipFiles/Zip/ZipInputStream.cs b/Src/IonicZipFiles/Zip/ZipInputStream.cs deleted file mode 100644 index 264221b0..00000000 --- a/Src/IonicZipFiles/Zip/ZipInputStream.cs +++ /dev/null @@ -1,177 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipInputStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Crc; -using System; -using System.IO; -using System.Text; - -namespace Ionic.Zip -{ - public class ZipInputStream : Stream - { - private Stream _inputStream; - private Encoding _provisionalAlternateEncoding; - private ZipEntry _currentEntry; - private bool _firstEntry; - private bool _needSetup; - private ZipContainer _container; - private CrcCalculatorStream _crcStream; - private long _LeftToRead; - internal string _Password; - private long _endOfEntry; - private string _name; - private bool _leaveUnderlyingStreamOpen; - private bool _closed; - private bool _findRequired; - private bool _exceptionPending; - private int \u003CCodecBufferSize\u003Ek__BackingField; - - public ZipInputStream(Stream stream) - : this(stream, false) - { - } - - public ZipInputStream(string fileName) => this._Init((Stream) File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read), false, fileName); - - public ZipInputStream(Stream stream, bool leaveOpen) => this._Init(stream, leaveOpen, (string) null); - - private void _Init(Stream stream, bool leaveOpen, string name) - { - this._inputStream = stream; - if (!this._inputStream.CanRead) - throw new ZipException("The stream must be readable."); - this._container = new ZipContainer((object) this); - this._provisionalAlternateEncoding = Encoding.GetEncoding("IBM437"); - this._leaveUnderlyingStreamOpen = leaveOpen; - this._findRequired = true; - this._name = name ?? "(stream)"; - } - - public override string ToString() => string.Format("ZipInputStream::{0}(leaveOpen({1})))", (object) this._name, (object) this._leaveUnderlyingStreamOpen); - - public Encoding ProvisionalAlternateEncoding - { - get => this._provisionalAlternateEncoding; - set => this._provisionalAlternateEncoding = value; - } - - public int CodecBufferSize - { - get => this.\u003CCodecBufferSize\u003Ek__BackingField; - set => this.\u003CCodecBufferSize\u003Ek__BackingField = value; - } - - public string Password - { - set - { - if (this._closed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - this._Password = value; - } - } - - private void SetupStream() - { - this._crcStream = this._currentEntry.InternalOpenReader(this._Password); - this._LeftToRead = this._crcStream.Length; - this._needSetup = false; - } - - internal Stream ReadStream => this._inputStream; - - public override int Read(byte[] buffer, int offset, int count) - { - if (this._closed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - if (this._needSetup) - this.SetupStream(); - if (this._LeftToRead == 0L) - return 0; - int count1 = this._LeftToRead > (long) count ? count : (int) this._LeftToRead; - int num = this._crcStream.Read(buffer, offset, count1); - this._LeftToRead -= (long) num; - if (this._LeftToRead == 0L) - { - this._currentEntry.VerifyCrcAfterExtract(this._crcStream.Crc); - this._inputStream.Seek(this._endOfEntry, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this._inputStream); - } - return num; - } - - public ZipEntry GetNextEntry() - { - if (this._findRequired) - { - if (SharedUtilities.FindSignature(this._inputStream, 67324752) == -1L) - return (ZipEntry) null; - this._inputStream.Seek(-4L, SeekOrigin.Current); - SharedUtilities.Workaround_Ladybug318918(this._inputStream); - } - else if (this._firstEntry) - { - this._inputStream.Seek(this._endOfEntry, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this._inputStream); - } - this._currentEntry = ZipEntry.ReadEntry(this._container, !this._firstEntry); - this._endOfEntry = this._inputStream.Position; - this._firstEntry = true; - this._needSetup = true; - this._findRequired = false; - return this._currentEntry; - } - - protected override void Dispose(bool disposing) - { - if (this._closed) - return; - if (disposing) - { - if (this._exceptionPending) - return; - if (!this._leaveUnderlyingStreamOpen) - this._inputStream.Close(); - } - this._closed = true; - } - - public override bool CanRead => true; - - public override bool CanSeek => this._inputStream.CanSeek; - - public override bool CanWrite => false; - - public override long Length => this._inputStream.Length; - - public override long Position - { - get => this._inputStream.Position; - set => this.Seek(value, SeekOrigin.Begin); - } - - public override void Flush() => throw new NotSupportedException(nameof (Flush)); - - public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException(nameof (Write)); - - public override long Seek(long offset, SeekOrigin origin) - { - this._findRequired = true; - long num = this._inputStream.Seek(offset, origin); - SharedUtilities.Workaround_Ladybug318918(this._inputStream); - return num; - } - - public override void SetLength(long value) => throw new NotSupportedException(); - } -} diff --git a/Src/IonicZipFiles/Zip/ZipOption.cs b/Src/IonicZipFiles/Zip/ZipOption.cs deleted file mode 100644 index 323ed536..00000000 --- a/Src/IonicZipFiles/Zip/ZipOption.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipOption -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum ZipOption - { - Default = 0, - Never = 0, - AsNecessary = 1, - Always = 2, - } -} diff --git a/Src/IonicZipFiles/Zip/ZipOutput.cs b/Src/IonicZipFiles/Zip/ZipOutput.cs deleted file mode 100644 index 917dff1e..00000000 --- a/Src/IonicZipFiles/Zip/ZipOutput.cs +++ /dev/null @@ -1,311 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipOutput -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace Ionic.Zip -{ - internal static class ZipOutput - { - public static bool WriteCentralDirectoryStructure( - Stream s, - ICollection entries, - uint numSegments, - Zip64Option zip64, - string comment, - ZipContainer container) - { - if (s is ZipSegmentedStream zipSegmentedStream) - zipSegmentedStream.ContiguousWrite = true; - long num1 = 0; - using (MemoryStream s1 = new MemoryStream()) - { - foreach (ZipEntry entry in (IEnumerable) entries) - { - if (entry.IncludedInMostRecentSave) - entry.WriteCentralDirectoryEntry((Stream) s1); - } - byte[] array = s1.ToArray(); - s.Write(array, 0, array.Length); - num1 = (long) array.Length; - } - long EndOfCentralDirectory = s is CountingStream countingStream ? countingStream.ComputedPosition : s.Position; - long StartOfCentralDirectory = EndOfCentralDirectory - num1; - uint currentSegment = zipSegmentedStream != null ? zipSegmentedStream.CurrentSegment : 0U; - long num2 = EndOfCentralDirectory - StartOfCentralDirectory; - int entryCount = ZipOutput.CountEntries(entries); - bool flag = zip64 == Zip64Option.Always || entryCount >= (int) ushort.MaxValue || num2 > (long) uint.MaxValue || StartOfCentralDirectory > (long) uint.MaxValue; - byte[] numArray1; - if (flag) - { - if (zip64 == Zip64Option.Default) - throw new ZipException("The archive requires a ZIP64 Central Directory. Consider enabling ZIP64 extensions."); - byte[] numArray2 = ZipOutput.GenZip64EndOfCentralDirectory(StartOfCentralDirectory, EndOfCentralDirectory, entryCount, numSegments); - numArray1 = ZipOutput.GenCentralDirectoryFooter(StartOfCentralDirectory, EndOfCentralDirectory, zip64, entryCount, comment, container); - if (currentSegment != 0U) - { - uint segment = zipSegmentedStream.ComputeSegment(numArray2.Length + numArray1.Length); - int destinationIndex1 = 16; - Array.Copy((Array) BitConverter.GetBytes(segment), 0, (Array) numArray2, destinationIndex1, 4); - int destinationIndex2 = destinationIndex1 + 4; - Array.Copy((Array) BitConverter.GetBytes(segment), 0, (Array) numArray2, destinationIndex2, 4); - int destinationIndex3 = 60; - Array.Copy((Array) BitConverter.GetBytes(segment), 0, (Array) numArray2, destinationIndex3, 4); - int destinationIndex4 = destinationIndex3 + 4 + 8; - Array.Copy((Array) BitConverter.GetBytes(segment), 0, (Array) numArray2, destinationIndex4, 4); - } - s.Write(numArray2, 0, numArray2.Length); - } - else - numArray1 = ZipOutput.GenCentralDirectoryFooter(StartOfCentralDirectory, EndOfCentralDirectory, zip64, entryCount, comment, container); - if (currentSegment != 0U) - { - ushort segment = (ushort) zipSegmentedStream.ComputeSegment(numArray1.Length); - int destinationIndex5 = 4; - Array.Copy((Array) BitConverter.GetBytes(segment), 0, (Array) numArray1, destinationIndex5, 2); - int destinationIndex6 = destinationIndex5 + 2; - Array.Copy((Array) BitConverter.GetBytes(segment), 0, (Array) numArray1, destinationIndex6, 2); - int num3 = destinationIndex6 + 2; - } - s.Write(numArray1, 0, numArray1.Length); - if (zipSegmentedStream != null) - zipSegmentedStream.ContiguousWrite = false; - return flag; - } - - private static Encoding GetEncoding(ZipContainer container, string t) - { - switch (container.AlternateEncodingUsage) - { - case ZipOption.Default: - return container.DefaultEncoding; - case ZipOption.Always: - return container.AlternateEncoding; - default: - Encoding defaultEncoding = container.DefaultEncoding; - if (t == null) - return defaultEncoding; - byte[] bytes = defaultEncoding.GetBytes(t); - return defaultEncoding.GetString(bytes, 0, bytes.Length).Equals(t) ? defaultEncoding : container.AlternateEncoding; - } - } - - private static byte[] GenCentralDirectoryFooter( - long StartOfCentralDirectory, - long EndOfCentralDirectory, - Zip64Option zip64, - int entryCount, - string comment, - ZipContainer container) - { - Encoding encoding = ZipOutput.GetEncoding(container, comment); - int num1 = 22; - byte[] numArray1 = (byte[]) null; - short num2 = 0; - if (comment != null && comment.Length != 0) - { - numArray1 = encoding.GetBytes(comment); - num2 = (short) numArray1.Length; - } - byte[] destinationArray = new byte[num1 + (int) num2]; - int destinationIndex = 0; - Array.Copy((Array) BitConverter.GetBytes(101010256U), 0, (Array) destinationArray, destinationIndex, 4); - int num3 = destinationIndex + 4; - byte[] numArray2 = destinationArray; - int index1 = num3; - int num4 = index1 + 1; - numArray2[index1] = (byte) 0; - byte[] numArray3 = destinationArray; - int index2 = num4; - int num5 = index2 + 1; - numArray3[index2] = (byte) 0; - byte[] numArray4 = destinationArray; - int index3 = num5; - int num6 = index3 + 1; - numArray4[index3] = (byte) 0; - byte[] numArray5 = destinationArray; - int index4 = num6; - int num7 = index4 + 1; - numArray5[index4] = (byte) 0; - if (entryCount >= (int) ushort.MaxValue || zip64 == Zip64Option.Always) - { - for (int index5 = 0; index5 < 4; ++index5) - destinationArray[num7++] = byte.MaxValue; - } - else - { - byte[] numArray6 = destinationArray; - int index6 = num7; - int num8 = index6 + 1; - int num9 = (int) (byte) (entryCount & (int) byte.MaxValue); - numArray6[index6] = (byte) num9; - byte[] numArray7 = destinationArray; - int index7 = num8; - int num10 = index7 + 1; - int num11 = (int) (byte) ((entryCount & 65280) >> 8); - numArray7[index7] = (byte) num11; - byte[] numArray8 = destinationArray; - int index8 = num10; - int num12 = index8 + 1; - int num13 = (int) (byte) (entryCount & (int) byte.MaxValue); - numArray8[index8] = (byte) num13; - byte[] numArray9 = destinationArray; - int index9 = num12; - num7 = index9 + 1; - int num14 = (int) (byte) ((entryCount & 65280) >> 8); - numArray9[index9] = (byte) num14; - } - long num15 = EndOfCentralDirectory - StartOfCentralDirectory; - if (num15 >= (long) uint.MaxValue || StartOfCentralDirectory >= (long) uint.MaxValue) - { - for (int index10 = 0; index10 < 8; ++index10) - destinationArray[num7++] = byte.MaxValue; - } - else - { - byte[] numArray10 = destinationArray; - int index11 = num7; - int num16 = index11 + 1; - int num17 = (int) (byte) ((ulong) num15 & (ulong) byte.MaxValue); - numArray10[index11] = (byte) num17; - byte[] numArray11 = destinationArray; - int index12 = num16; - int num18 = index12 + 1; - int num19 = (int) (byte) ((num15 & 65280L) >> 8); - numArray11[index12] = (byte) num19; - byte[] numArray12 = destinationArray; - int index13 = num18; - int num20 = index13 + 1; - int num21 = (int) (byte) ((num15 & 16711680L) >> 16); - numArray12[index13] = (byte) num21; - byte[] numArray13 = destinationArray; - int index14 = num20; - int num22 = index14 + 1; - int num23 = (int) (byte) ((num15 & 4278190080L) >> 24); - numArray13[index14] = (byte) num23; - byte[] numArray14 = destinationArray; - int index15 = num22; - int num24 = index15 + 1; - int num25 = (int) (byte) ((ulong) StartOfCentralDirectory & (ulong) byte.MaxValue); - numArray14[index15] = (byte) num25; - byte[] numArray15 = destinationArray; - int index16 = num24; - int num26 = index16 + 1; - int num27 = (int) (byte) ((StartOfCentralDirectory & 65280L) >> 8); - numArray15[index16] = (byte) num27; - byte[] numArray16 = destinationArray; - int index17 = num26; - int num28 = index17 + 1; - int num29 = (int) (byte) ((StartOfCentralDirectory & 16711680L) >> 16); - numArray16[index17] = (byte) num29; - byte[] numArray17 = destinationArray; - int index18 = num28; - num7 = index18 + 1; - int num30 = (int) (byte) ((StartOfCentralDirectory & 4278190080L) >> 24); - numArray17[index18] = (byte) num30; - } - int num31; - if (comment == null || comment.Length == 0) - { - byte[] numArray18 = destinationArray; - int index19 = num7; - int num32 = index19 + 1; - numArray18[index19] = (byte) 0; - byte[] numArray19 = destinationArray; - int index20 = num32; - num31 = index20 + 1; - numArray19[index20] = (byte) 0; - } - else - { - if ((int) num2 + num7 + 2 > destinationArray.Length) - num2 = (short) (destinationArray.Length - num7 - 2); - byte[] numArray20 = destinationArray; - int index21 = num7; - int num33 = index21 + 1; - int num34 = (int) (byte) ((uint) num2 & (uint) byte.MaxValue); - numArray20[index21] = (byte) num34; - byte[] numArray21 = destinationArray; - int index22 = num33; - int num35 = index22 + 1; - int num36 = (int) (byte) (((int) num2 & 65280) >> 8); - numArray21[index22] = (byte) num36; - if (num2 != (short) 0) - { - int index23; - for (index23 = 0; index23 < (int) num2 && num35 + index23 < destinationArray.Length; ++index23) - destinationArray[num35 + index23] = numArray1[index23]; - num31 = num35 + index23; - } - } - return destinationArray; - } - - private static byte[] GenZip64EndOfCentralDirectory( - long StartOfCentralDirectory, - long EndOfCentralDirectory, - int entryCount, - uint numSegments) - { - byte[] destinationArray = new byte[76]; - int destinationIndex1 = 0; - Array.Copy((Array) BitConverter.GetBytes(101075792U), 0, (Array) destinationArray, destinationIndex1, 4); - int destinationIndex2 = destinationIndex1 + 4; - Array.Copy((Array) BitConverter.GetBytes(44L), 0, (Array) destinationArray, destinationIndex2, 8); - int num1 = destinationIndex2 + 8; - byte[] numArray1 = destinationArray; - int index1 = num1; - int num2 = index1 + 1; - numArray1[index1] = (byte) 45; - byte[] numArray2 = destinationArray; - int index2 = num2; - int num3 = index2 + 1; - numArray2[index2] = (byte) 0; - byte[] numArray3 = destinationArray; - int index3 = num3; - int num4 = index3 + 1; - numArray3[index3] = (byte) 45; - byte[] numArray4 = destinationArray; - int index4 = num4; - int destinationIndex3 = index4 + 1; - numArray4[index4] = (byte) 0; - for (int index5 = 0; index5 < 8; ++index5) - destinationArray[destinationIndex3++] = (byte) 0; - long num5 = (long) entryCount; - Array.Copy((Array) BitConverter.GetBytes(num5), 0, (Array) destinationArray, destinationIndex3, 8); - int destinationIndex4 = destinationIndex3 + 8; - Array.Copy((Array) BitConverter.GetBytes(num5), 0, (Array) destinationArray, destinationIndex4, 8); - int destinationIndex5 = destinationIndex4 + 8; - Array.Copy((Array) BitConverter.GetBytes(EndOfCentralDirectory - StartOfCentralDirectory), 0, (Array) destinationArray, destinationIndex5, 8); - int destinationIndex6 = destinationIndex5 + 8; - Array.Copy((Array) BitConverter.GetBytes(StartOfCentralDirectory), 0, (Array) destinationArray, destinationIndex6, 8); - int destinationIndex7 = destinationIndex6 + 8; - Array.Copy((Array) BitConverter.GetBytes(117853008U), 0, (Array) destinationArray, destinationIndex7, 4); - int destinationIndex8 = destinationIndex7 + 4; - Array.Copy((Array) BitConverter.GetBytes(numSegments == 0U ? 0U : numSegments - 1U), 0, (Array) destinationArray, destinationIndex8, 4); - int destinationIndex9 = destinationIndex8 + 4; - Array.Copy((Array) BitConverter.GetBytes(EndOfCentralDirectory), 0, (Array) destinationArray, destinationIndex9, 8); - int destinationIndex10 = destinationIndex9 + 8; - Array.Copy((Array) BitConverter.GetBytes(numSegments), 0, (Array) destinationArray, destinationIndex10, 4); - int num6 = destinationIndex10 + 4; - return destinationArray; - } - - private static int CountEntries(ICollection _entries) - { - int num = 0; - foreach (ZipEntry entry in (IEnumerable) _entries) - { - if (entry.IncludedInMostRecentSave) - ++num; - } - return num; - } - } -} diff --git a/Src/IonicZipFiles/Zip/ZipOutputStream.cs b/Src/IonicZipFiles/Zip/ZipOutputStream.cs deleted file mode 100644 index 5d4d0f57..00000000 --- a/Src/IonicZipFiles/Zip/ZipOutputStream.cs +++ /dev/null @@ -1,384 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipOutputStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Crc; -using Ionic.Zlib; -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace Ionic.Zip -{ - public class ZipOutputStream : Stream - { - private EncryptionAlgorithm _encryption; - private ZipEntryTimestamp _timestamp; - internal string _password; - private string _comment; - private Stream _outputStream; - private ZipEntry _currentEntry; - internal Zip64Option _zip64; - private Dictionary _entriesWritten; - private int _entryCount; - private ZipOption _alternateEncodingUsage; - private Encoding _alternateEncoding = Encoding.GetEncoding("IBM437"); - private bool _leaveUnderlyingStreamOpen; - private bool _disposed; - private bool _exceptionPending; - private bool _anyEntriesUsedZip64; - private bool _directoryNeededZip64; - private CountingStream _outputCounter; - private Stream _encryptor; - private Stream _deflater; - private CrcCalculatorStream _entryOutputStream; - private bool _needToWriteEntryHeader; - private string _name; - private bool _DontIgnoreCase; - private int \u003CCodecBufferSize\u003Ek__BackingField; - private CompressionStrategy \u003CStrategy\u003Ek__BackingField; - private CompressionLevel \u003CCompressionLevel\u003Ek__BackingField; - private CompressionMethod \u003CCompressionMethod\u003Ek__BackingField; - - public ZipOutputStream(Stream stream) - : this(stream, false) - { - } - - public ZipOutputStream(string fileName) => this._Init((Stream) File.Open(fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None), false, fileName); - - public ZipOutputStream(Stream stream, bool leaveOpen) => this._Init(stream, leaveOpen, (string) null); - - private void _Init(Stream stream, bool leaveOpen, string name) - { - this._outputStream = stream.CanRead ? stream : (Stream) new CountingStream(stream); - this.CompressionLevel = CompressionLevel.Default; - this.CompressionMethod = CompressionMethod.Deflate; - this._encryption = EncryptionAlgorithm.None; - this._entriesWritten = new Dictionary((IEqualityComparer) StringComparer.Ordinal); - this._zip64 = Zip64Option.Default; - this._leaveUnderlyingStreamOpen = leaveOpen; - this.Strategy = CompressionStrategy.Default; - this._name = name ?? "(stream)"; - } - - public override string ToString() => string.Format("ZipOutputStream::{0}(leaveOpen({1})))", (object) this._name, (object) this._leaveUnderlyingStreamOpen); - - public string Password - { - set - { - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - this._password = value; - if (this._password == null) - { - this._encryption = EncryptionAlgorithm.None; - } - else - { - if (this._encryption != EncryptionAlgorithm.None) - return; - this._encryption = EncryptionAlgorithm.PkzipWeak; - } - } - } - - public EncryptionAlgorithm Encryption - { - get => this._encryption; - set - { - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - if (value == EncryptionAlgorithm.Unsupported) - { - this._exceptionPending = true; - throw new InvalidOperationException("You may not set Encryption to that value."); - } - this._encryption = value; - } - } - - public int CodecBufferSize - { - get => this.\u003CCodecBufferSize\u003Ek__BackingField; - set => this.\u003CCodecBufferSize\u003Ek__BackingField = value; - } - - public CompressionStrategy Strategy - { - get => this.\u003CStrategy\u003Ek__BackingField; - set => this.\u003CStrategy\u003Ek__BackingField = value; - } - - public ZipEntryTimestamp Timestamp - { - get => this._timestamp; - set - { - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - this._timestamp = value; - } - } - - public CompressionLevel CompressionLevel - { - get => this.\u003CCompressionLevel\u003Ek__BackingField; - set => this.\u003CCompressionLevel\u003Ek__BackingField = value; - } - - public CompressionMethod CompressionMethod - { - get => this.\u003CCompressionMethod\u003Ek__BackingField; - set => this.\u003CCompressionMethod\u003Ek__BackingField = value; - } - - public string Comment - { - get => this._comment; - set - { - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - this._comment = value; - } - } - - public Zip64Option EnableZip64 - { - get => this._zip64; - set - { - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - this._zip64 = value; - } - } - - public bool OutputUsedZip64 => this._anyEntriesUsedZip64 || this._directoryNeededZip64; - - public bool IgnoreCase - { - get => !this._DontIgnoreCase; - set => this._DontIgnoreCase = !value; - } - - [Obsolete("Beginning with v1.9.1.6 of DotNetZip, this property is obsolete. It will be removed in a future version of the library. Use AlternateEncoding and AlternateEncodingUsage instead.")] - public bool UseUnicodeAsNecessary - { - get => this._alternateEncoding == Encoding.UTF8 && this.AlternateEncodingUsage == ZipOption.AsNecessary; - set - { - if (value) - { - this._alternateEncoding = Encoding.UTF8; - this._alternateEncodingUsage = ZipOption.AsNecessary; - } - else - { - this._alternateEncoding = ZipOutputStream.DefaultEncoding; - this._alternateEncodingUsage = ZipOption.Default; - } - } - } - - [Obsolete("use AlternateEncoding and AlternateEncodingUsage instead.")] - public Encoding ProvisionalAlternateEncoding - { - get => this._alternateEncodingUsage == ZipOption.AsNecessary ? this._alternateEncoding : (Encoding) null; - set - { - this._alternateEncoding = value; - this._alternateEncodingUsage = ZipOption.AsNecessary; - } - } - - public Encoding AlternateEncoding - { - get => this._alternateEncoding; - set => this._alternateEncoding = value; - } - - public ZipOption AlternateEncodingUsage - { - get => this._alternateEncodingUsage; - set => this._alternateEncodingUsage = value; - } - - public static Encoding DefaultEncoding => Encoding.GetEncoding("IBM437"); - - private void InsureUniqueEntry(ZipEntry ze1) - { - if (this._entriesWritten.ContainsKey(ze1.FileName)) - { - this._exceptionPending = true; - throw new ArgumentException(string.Format("The entry '{0}' already exists in the zip archive.", (object) ze1.FileName)); - } - } - - internal Stream OutputStream => this._outputStream; - - internal string Name => this._name; - - public bool ContainsEntry(string name) => this._entriesWritten.ContainsKey(SharedUtilities.NormalizePathForUseInZipFile(name)); - - public override void Write(byte[] buffer, int offset, int count) - { - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - if (buffer == null) - { - this._exceptionPending = true; - throw new ArgumentNullException(nameof (buffer)); - } - if (this._currentEntry == null) - { - this._exceptionPending = true; - throw new InvalidOperationException("You must call PutNextEntry() before calling Write()."); - } - if (this._currentEntry.IsDirectory) - { - this._exceptionPending = true; - throw new InvalidOperationException("You cannot Write() data for an entry that is a directory."); - } - if (this._needToWriteEntryHeader) - this._InitiateCurrentEntry(false); - if (count == 0) - return; - this._entryOutputStream.Write(buffer, offset, count); - } - - public ZipEntry PutNextEntry(string entryName) - { - if (string.IsNullOrEmpty(entryName)) - throw new ArgumentNullException(nameof (entryName)); - if (this._disposed) - { - this._exceptionPending = true; - throw new InvalidOperationException("The stream has been closed."); - } - this._FinishCurrentEntry(); - this._currentEntry = ZipEntry.CreateForZipOutputStream(entryName); - this._currentEntry._container = new ZipContainer((object) this); - this._currentEntry._BitField |= (short) 8; - this._currentEntry.SetEntryTimes(DateTime.Now, DateTime.Now, DateTime.Now); - this._currentEntry.CompressionLevel = this.CompressionLevel; - this._currentEntry.CompressionMethod = this.CompressionMethod; - this._currentEntry.Password = this._password; - this._currentEntry.Encryption = this.Encryption; - this._currentEntry.AlternateEncoding = this.AlternateEncoding; - this._currentEntry.AlternateEncodingUsage = this.AlternateEncodingUsage; - if (entryName.EndsWith("/")) - this._currentEntry.MarkAsDirectory(); - this._currentEntry.EmitTimesInWindowsFormatWhenSaving = (this._timestamp & ZipEntryTimestamp.Windows) != ZipEntryTimestamp.None; - this._currentEntry.EmitTimesInUnixFormatWhenSaving = (this._timestamp & ZipEntryTimestamp.Unix) != ZipEntryTimestamp.None; - this.InsureUniqueEntry(this._currentEntry); - this._needToWriteEntryHeader = true; - return this._currentEntry; - } - - private void _InitiateCurrentEntry(bool finishing) - { - this._entriesWritten.Add(this._currentEntry.FileName, this._currentEntry); - ++this._entryCount; - if (this._entryCount > 65534 && this._zip64 == Zip64Option.Default) - { - this._exceptionPending = true; - throw new InvalidOperationException("Too many entries. Consider setting ZipOutputStream.EnableZip64."); - } - this._currentEntry.WriteHeader(this._outputStream, finishing ? 99 : 0); - this._currentEntry.StoreRelativeOffset(); - if (!this._currentEntry.IsDirectory) - { - this._currentEntry.WriteSecurityMetadata(this._outputStream); - this._currentEntry.PrepOutputStream(this._outputStream, finishing ? 0L : -1L, out this._outputCounter, out this._encryptor, out this._deflater, out this._entryOutputStream); - } - this._needToWriteEntryHeader = false; - } - - private void _FinishCurrentEntry() - { - if (this._currentEntry == null) - return; - if (this._needToWriteEntryHeader) - this._InitiateCurrentEntry(true); - this._currentEntry.FinishOutputStream(this._outputStream, this._outputCounter, this._encryptor, this._deflater, this._entryOutputStream); - this._currentEntry.PostProcessOutput(this._outputStream); - if (this._currentEntry.OutputUsedZip64.HasValue) - this._anyEntriesUsedZip64 |= this._currentEntry.OutputUsedZip64.Value; - this._outputCounter = (CountingStream) null; - this._encryptor = this._deflater = (Stream) null; - this._entryOutputStream = (CrcCalculatorStream) null; - } - - protected override void Dispose(bool disposing) - { - if (this._disposed) - return; - if (disposing && !this._exceptionPending) - { - this._FinishCurrentEntry(); - this._directoryNeededZip64 = ZipOutput.WriteCentralDirectoryStructure(this._outputStream, (ICollection) this._entriesWritten.Values, 1U, this._zip64, this.Comment, new ZipContainer((object) this)); - Stream stream; - if (this._outputStream is CountingStream outputStream) - { - stream = outputStream.WrappedStream; - outputStream.Close(); - } - else - stream = this._outputStream; - if (!this._leaveUnderlyingStreamOpen) - stream.Close(); - this._outputStream = (Stream) null; - } - this._disposed = true; - } - - public override bool CanRead => false; - - public override bool CanSeek => false; - - public override bool CanWrite => true; - - public override long Length => throw new NotSupportedException(); - - public override long Position - { - get => this._outputStream.Position; - set => throw new NotSupportedException(); - } - - public override void Flush() - { - } - - public override int Read(byte[] buffer, int offset, int count) => throw new NotSupportedException(nameof (Read)); - - public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(nameof (Seek)); - - public override void SetLength(long value) => throw new NotSupportedException(); - } -} diff --git a/Src/IonicZipFiles/Zip/ZipProgressEventArgs.cs b/Src/IonicZipFiles/Zip/ZipProgressEventArgs.cs deleted file mode 100644 index aef61db7..00000000 --- a/Src/IonicZipFiles/Zip/ZipProgressEventArgs.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipProgressEventArgs -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zip -{ - public class ZipProgressEventArgs : EventArgs - { - private int _entriesTotal; - private bool _cancel; - private ZipEntry _latestEntry; - private ZipProgressEventType _flavor; - private string _archiveName; - private long _bytesTransferred; - private long _totalBytesToTransfer; - - internal ZipProgressEventArgs() - { - } - - internal ZipProgressEventArgs(string archiveName, ZipProgressEventType flavor) - { - this._archiveName = archiveName; - this._flavor = flavor; - } - - public int EntriesTotal - { - get => this._entriesTotal; - set => this._entriesTotal = value; - } - - public ZipEntry CurrentEntry - { - get => this._latestEntry; - set => this._latestEntry = value; - } - - public bool Cancel - { - get => this._cancel; - set => this._cancel = this._cancel || value; - } - - public ZipProgressEventType EventType - { - get => this._flavor; - set => this._flavor = value; - } - - public string ArchiveName - { - get => this._archiveName; - set => this._archiveName = value; - } - - public long BytesTransferred - { - get => this._bytesTransferred; - set => this._bytesTransferred = value; - } - - public long TotalBytesToTransfer - { - get => this._totalBytesToTransfer; - set => this._totalBytesToTransfer = value; - } - } -} diff --git a/Src/IonicZipFiles/Zip/ZipProgressEventType.cs b/Src/IonicZipFiles/Zip/ZipProgressEventType.cs deleted file mode 100644 index 069d1d3b..00000000 --- a/Src/IonicZipFiles/Zip/ZipProgressEventType.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipProgressEventType -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zip -{ - public enum ZipProgressEventType - { - Adding_Started, - Adding_AfterAddEntry, - Adding_Completed, - Reading_Started, - Reading_BeforeReadEntry, - Reading_AfterReadEntry, - Reading_Completed, - Reading_ArchiveBytesRead, - Saving_Started, - Saving_BeforeWriteEntry, - Saving_AfterWriteEntry, - Saving_Completed, - Saving_AfterSaveTempArchive, - Saving_BeforeRenameTempArchive, - Saving_AfterRenameTempArchive, - Saving_AfterCompileSelfExtractor, - Saving_EntryBytesRead, - Extracting_BeforeExtractEntry, - Extracting_AfterExtractEntry, - Extracting_ExtractEntryWouldOverwrite, - Extracting_EntryBytesWritten, - Extracting_BeforeExtractAll, - Extracting_AfterExtractAll, - Error_Saving, - } -} diff --git a/Src/IonicZipFiles/Zip/ZipSegmentedStream.cs b/Src/IonicZipFiles/Zip/ZipSegmentedStream.cs deleted file mode 100644 index 5b671333..00000000 --- a/Src/IonicZipFiles/Zip/ZipSegmentedStream.cs +++ /dev/null @@ -1,289 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zip.ZipSegmentedStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Zip -{ - internal class ZipSegmentedStream : Stream - { - private ZipSegmentedStream.RwMode rwMode; - private bool _exceptionPending; - private string _baseName; - private string _baseDir; - private string _currentName; - private string _currentTempName; - private uint _currentDiskNumber; - private uint _maxDiskNumber; - private int _maxSegmentSize; - private Stream _innerStream; - private bool \u003CContiguousWrite\u003Ek__BackingField; - - private ZipSegmentedStream() => this._exceptionPending = false; - - public static ZipSegmentedStream ForReading( - string name, - uint initialDiskNumber, - uint maxDiskNumber) - { - ZipSegmentedStream zipSegmentedStream = new ZipSegmentedStream() - { - rwMode = ZipSegmentedStream.RwMode.ReadOnly, - CurrentSegment = initialDiskNumber, - _maxDiskNumber = maxDiskNumber, - _baseName = name - }; - zipSegmentedStream._SetReadStream(); - return zipSegmentedStream; - } - - public static ZipSegmentedStream ForWriting(string name, int maxSegmentSize) - { - ZipSegmentedStream zipSegmentedStream = new ZipSegmentedStream() - { - rwMode = ZipSegmentedStream.RwMode.Write, - CurrentSegment = 0, - _baseName = name, - _maxSegmentSize = maxSegmentSize, - _baseDir = Path.GetDirectoryName(name) - }; - if (zipSegmentedStream._baseDir == "") - zipSegmentedStream._baseDir = "."; - zipSegmentedStream._SetWriteStream(0U); - return zipSegmentedStream; - } - - public static Stream ForUpdate(string name, uint diskNumber) => diskNumber < 99U ? (Stream) File.Open(string.Format("{0}.z{1:D2}", (object) Path.Combine(Path.GetDirectoryName(name), Path.GetFileNameWithoutExtension(name)), (object) (uint) ((int) diskNumber + 1)), FileMode.Open, FileAccess.ReadWrite, FileShare.None) : throw new ArgumentOutOfRangeException(nameof (diskNumber)); - - public bool ContiguousWrite - { - get => this.\u003CContiguousWrite\u003Ek__BackingField; - set => this.\u003CContiguousWrite\u003Ek__BackingField = value; - } - - public uint CurrentSegment - { - get => this._currentDiskNumber; - private set - { - this._currentDiskNumber = value; - this._currentName = (string) null; - } - } - - public string CurrentName - { - get - { - if (this._currentName == null) - this._currentName = this._NameForSegment(this.CurrentSegment); - return this._currentName; - } - } - - public string CurrentTempName => this._currentTempName; - - private string _NameForSegment(uint diskNumber) - { - if (diskNumber >= 99U) - { - this._exceptionPending = true; - throw new OverflowException("The number of zip segments would exceed 99."); - } - return string.Format("{0}.z{1:D2}", (object) Path.Combine(Path.GetDirectoryName(this._baseName), Path.GetFileNameWithoutExtension(this._baseName)), (object) (uint) ((int) diskNumber + 1)); - } - - public uint ComputeSegment(int length) => this._innerStream.Position + (long) length > (long) this._maxSegmentSize ? this.CurrentSegment + 1U : this.CurrentSegment; - - public override string ToString() => string.Format("{0}[{1}][{2}], pos=0x{3:X})", (object) nameof (ZipSegmentedStream), (object) this.CurrentName, (object) this.rwMode.ToString(), (object) this.Position); - - private void _SetReadStream() - { - if (this._innerStream != null) - this._innerStream.Close(); - if ((int) this.CurrentSegment + 1 == (int) this._maxDiskNumber) - this._currentName = this._baseName; - this._innerStream = (Stream) File.OpenRead(this.CurrentName); - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (this.rwMode != ZipSegmentedStream.RwMode.ReadOnly) - { - this._exceptionPending = true; - throw new InvalidOperationException("Stream Error: Cannot Read."); - } - int num1 = this._innerStream.Read(buffer, offset, count); - int num2 = num1; - while (num2 != count) - { - if (this._innerStream.Position != this._innerStream.Length) - { - this._exceptionPending = true; - throw new ZipException(string.Format("Read error in file {0}", (object) this.CurrentName)); - } - if ((int) this.CurrentSegment + 1 == (int) this._maxDiskNumber) - return num1; - ++this.CurrentSegment; - this._SetReadStream(); - offset += num2; - count -= num2; - num2 = this._innerStream.Read(buffer, offset, count); - num1 += num2; - } - return num1; - } - - private void _SetWriteStream(uint increment) - { - if (this._innerStream != null) - { - this._innerStream.Close(); - if (File.Exists(this.CurrentName)) - File.Delete(this.CurrentName); - File.Move(this._currentTempName, this.CurrentName); - } - if (increment > 0U) - this.CurrentSegment += increment; - SharedUtilities.CreateAndOpenUniqueTempFile(this._baseDir, out this._innerStream, out this._currentTempName); - if (this.CurrentSegment != 0U) - return; - this._innerStream.Write(BitConverter.GetBytes(134695760), 0, 4); - } - - public override void Write(byte[] buffer, int offset, int count) - { - if (this.rwMode != ZipSegmentedStream.RwMode.Write) - { - this._exceptionPending = true; - throw new InvalidOperationException("Stream Error: Cannot Write."); - } - if (this.ContiguousWrite) - { - if (this._innerStream.Position + (long) count > (long) this._maxSegmentSize) - this._SetWriteStream(1U); - } - else - { - while (this._innerStream.Position + (long) count > (long) this._maxSegmentSize) - { - int count1 = this._maxSegmentSize - (int) this._innerStream.Position; - this._innerStream.Write(buffer, offset, count1); - this._SetWriteStream(1U); - count -= count1; - offset += count1; - } - } - this._innerStream.Write(buffer, offset, count); - } - - public long TruncateBackward(uint diskNumber, long offset) - { - if (diskNumber >= 99U) - throw new ArgumentOutOfRangeException(nameof (diskNumber)); - if (this.rwMode != ZipSegmentedStream.RwMode.Write) - { - this._exceptionPending = true; - throw new ZipException("bad state."); - } - if ((int) diskNumber == (int) this.CurrentSegment) - { - long num = this._innerStream.Seek(offset, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this._innerStream); - return num; - } - if (this._innerStream != null) - { - this._innerStream.Close(); - if (File.Exists(this._currentTempName)) - File.Delete(this._currentTempName); - } - for (uint diskNumber1 = this.CurrentSegment - 1U; diskNumber1 > diskNumber; --diskNumber1) - { - string path = this._NameForSegment(diskNumber1); - if (File.Exists(path)) - File.Delete(path); - } - this.CurrentSegment = diskNumber; - for (int index = 0; index < 3; ++index) - { - try - { - this._currentTempName = SharedUtilities.InternalGetTempFileName(); - File.Move(this.CurrentName, this._currentTempName); - break; - } - catch (IOException ex) - { - if (index == 2) - throw; - } - } - this._innerStream = (Stream) new FileStream(this._currentTempName, FileMode.Open); - long num1 = this._innerStream.Seek(offset, SeekOrigin.Begin); - SharedUtilities.Workaround_Ladybug318918(this._innerStream); - return num1; - } - - public override bool CanRead => this.rwMode == ZipSegmentedStream.RwMode.ReadOnly && this._innerStream != null && this._innerStream.CanRead; - - public override bool CanSeek => this._innerStream != null && this._innerStream.CanSeek; - - public override bool CanWrite => this.rwMode == ZipSegmentedStream.RwMode.Write && this._innerStream != null && this._innerStream.CanWrite; - - public override void Flush() => this._innerStream.Flush(); - - public override long Length => this._innerStream.Length; - - public override long Position - { - get => this._innerStream.Position; - set => this._innerStream.Position = value; - } - - public override long Seek(long offset, SeekOrigin origin) - { - long num = this._innerStream.Seek(offset, origin); - SharedUtilities.Workaround_Ladybug318918(this._innerStream); - return num; - } - - public override void SetLength(long value) - { - if (this.rwMode != ZipSegmentedStream.RwMode.Write) - { - this._exceptionPending = true; - throw new InvalidOperationException(); - } - this._innerStream.SetLength(value); - } - - protected override void Dispose(bool disposing) - { - try - { - if (this._innerStream == null) - return; - this._innerStream.Close(); - if (this.rwMode != ZipSegmentedStream.RwMode.Write) - return; - int num = this._exceptionPending ? 1 : 0; - } - finally - { - base.Dispose(disposing); - } - } - - private enum RwMode - { - None, - ReadOnly, - Write, - } - } -} diff --git a/Src/IonicZipFiles/Zlib/Adler.cs b/Src/IonicZipFiles/Zlib/Adler.cs deleted file mode 100644 index d31a73eb..00000000 --- a/Src/IonicZipFiles/Zlib/Adler.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.Adler -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - public sealed class Adler - { - private static readonly uint BASE = 65521; - private static readonly int NMAX = 5552; - - public static uint Adler32(uint adler, byte[] buf, int index, int len) - { - if (buf == null) - return 1; - uint num1 = adler & (uint) ushort.MaxValue; - uint num2 = adler >> 16 & (uint) ushort.MaxValue; - while (len > 0) - { - int num3 = len < Adler.NMAX ? len : Adler.NMAX; - len -= num3; - for (; num3 >= 16; num3 -= 16) - { - uint num4 = num1 + (uint) buf[index++]; - uint num5 = num2 + num4; - uint num6 = num4 + (uint) buf[index++]; - uint num7 = num5 + num6; - uint num8 = num6 + (uint) buf[index++]; - uint num9 = num7 + num8; - uint num10 = num8 + (uint) buf[index++]; - uint num11 = num9 + num10; - uint num12 = num10 + (uint) buf[index++]; - uint num13 = num11 + num12; - uint num14 = num12 + (uint) buf[index++]; - uint num15 = num13 + num14; - uint num16 = num14 + (uint) buf[index++]; - uint num17 = num15 + num16; - uint num18 = num16 + (uint) buf[index++]; - uint num19 = num17 + num18; - uint num20 = num18 + (uint) buf[index++]; - uint num21 = num19 + num20; - uint num22 = num20 + (uint) buf[index++]; - uint num23 = num21 + num22; - uint num24 = num22 + (uint) buf[index++]; - uint num25 = num23 + num24; - uint num26 = num24 + (uint) buf[index++]; - uint num27 = num25 + num26; - uint num28 = num26 + (uint) buf[index++]; - uint num29 = num27 + num28; - uint num30 = num28 + (uint) buf[index++]; - uint num31 = num29 + num30; - uint num32 = num30 + (uint) buf[index++]; - uint num33 = num31 + num32; - num1 = num32 + (uint) buf[index++]; - num2 = num33 + num1; - } - if (num3 != 0) - { - do - { - num1 += (uint) buf[index++]; - num2 += num1; - } - while (--num3 != 0); - } - num1 %= Adler.BASE; - num2 %= Adler.BASE; - } - return num2 << 16 | num1; - } - } -} diff --git a/Src/IonicZipFiles/Zlib/BlockState.cs b/Src/IonicZipFiles/Zlib/BlockState.cs deleted file mode 100644 index 399807eb..00000000 --- a/Src/IonicZipFiles/Zlib/BlockState.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.BlockState -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal enum BlockState - { - NeedMore, - BlockDone, - FinishStarted, - FinishDone, - } -} diff --git a/Src/IonicZipFiles/Zlib/CompressionLevel.cs b/Src/IonicZipFiles/Zlib/CompressionLevel.cs deleted file mode 100644 index 653fa439..00000000 --- a/Src/IonicZipFiles/Zlib/CompressionLevel.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.CompressionLevel -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - public enum CompressionLevel - { - Level0 = 0, - None = 0, - BestSpeed = 1, - Level1 = 1, - Level2 = 2, - Level3 = 3, - Level4 = 4, - Level5 = 5, - Default = 6, - Level6 = 6, - Level7 = 7, - Level8 = 8, - BestCompression = 9, - Level9 = 9, - } -} diff --git a/Src/IonicZipFiles/Zlib/CompressionMode.cs b/Src/IonicZipFiles/Zlib/CompressionMode.cs deleted file mode 100644 index decd31c4..00000000 --- a/Src/IonicZipFiles/Zlib/CompressionMode.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.CompressionMode -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - public enum CompressionMode - { - Compress, - Decompress, - } -} diff --git a/Src/IonicZipFiles/Zlib/CompressionStrategy.cs b/Src/IonicZipFiles/Zlib/CompressionStrategy.cs deleted file mode 100644 index 5a954c17..00000000 --- a/Src/IonicZipFiles/Zlib/CompressionStrategy.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.CompressionStrategy -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - public enum CompressionStrategy - { - Default, - Filtered, - HuffmanOnly, - } -} diff --git a/Src/IonicZipFiles/Zlib/DeflateFlavor.cs b/Src/IonicZipFiles/Zlib/DeflateFlavor.cs deleted file mode 100644 index b590ae2b..00000000 --- a/Src/IonicZipFiles/Zlib/DeflateFlavor.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.DeflateFlavor -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal enum DeflateFlavor - { - Store, - Fast, - Slow, - } -} diff --git a/Src/IonicZipFiles/Zlib/DeflateManager.cs b/Src/IonicZipFiles/Zlib/DeflateManager.cs deleted file mode 100644 index c7f93f07..00000000 --- a/Src/IonicZipFiles/Zlib/DeflateManager.cs +++ /dev/null @@ -1,1107 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.DeflateManager -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zlib -{ - internal sealed class DeflateManager - { - private static readonly int MEM_LEVEL_MAX = 9; - private static readonly int MEM_LEVEL_DEFAULT = 8; - private DeflateManager.CompressFunc DeflateFunction; - private static readonly string[] _ErrorMessage = new string[10] - { - "need dictionary", - "stream end", - "", - "file error", - "stream error", - "data error", - "insufficient memory", - "buffer error", - "incompatible version", - "" - }; - private static readonly int PRESET_DICT = 32; - private static readonly int INIT_STATE = 42; - private static readonly int BUSY_STATE = 113; - private static readonly int FINISH_STATE = 666; - private static readonly int Z_DEFLATED = 8; - private static readonly int STORED_BLOCK = 0; - private static readonly int STATIC_TREES = 1; - private static readonly int DYN_TREES = 2; - private static readonly int Z_BINARY = 0; - private static readonly int Z_ASCII = 1; - private static readonly int Z_UNKNOWN = 2; - private static readonly int Buf_size = 16; - private static readonly int MIN_MATCH = 3; - private static readonly int MAX_MATCH = 258; - private static readonly int MIN_LOOKAHEAD = DeflateManager.MAX_MATCH + DeflateManager.MIN_MATCH + 1; - private static readonly int HEAP_SIZE = 2 * InternalConstants.L_CODES + 1; - private static readonly int END_BLOCK = 256; - internal ZlibCodec _codec; - internal int status; - internal byte[] pending; - internal int nextPending; - internal int pendingCount; - internal sbyte data_type; - internal int last_flush; - internal int w_size; - internal int w_bits; - internal int w_mask; - internal byte[] window; - internal int window_size; - internal short[] prev; - internal short[] head; - internal int ins_h; - internal int hash_size; - internal int hash_bits; - internal int hash_mask; - internal int hash_shift; - internal int block_start; - private DeflateManager.Config config; - internal int match_length; - internal int prev_match; - internal int match_available; - internal int strstart; - internal int match_start; - internal int lookahead; - internal int prev_length; - internal CompressionLevel compressionLevel; - internal CompressionStrategy compressionStrategy; - internal short[] dyn_ltree; - internal short[] dyn_dtree; - internal short[] bl_tree; - internal Tree treeLiterals = new Tree(); - internal Tree treeDistances = new Tree(); - internal Tree treeBitLengths = new Tree(); - internal short[] bl_count = new short[InternalConstants.MAX_BITS + 1]; - internal int[] heap = new int[2 * InternalConstants.L_CODES + 1]; - internal int heap_len; - internal int heap_max; - internal sbyte[] depth = new sbyte[2 * InternalConstants.L_CODES + 1]; - internal int _lengthOffset; - internal int lit_bufsize; - internal int last_lit; - internal int _distanceOffset; - internal int opt_len; - internal int static_len; - internal int matches; - internal int last_eob_len; - internal short bi_buf; - internal int bi_valid; - private bool Rfc1950BytesEmitted; - private bool _WantRfc1950HeaderBytes = true; - - internal DeflateManager() - { - this.dyn_ltree = new short[DeflateManager.HEAP_SIZE * 2]; - this.dyn_dtree = new short[(2 * InternalConstants.D_CODES + 1) * 2]; - this.bl_tree = new short[(2 * InternalConstants.BL_CODES + 1) * 2]; - } - - private void _InitializeLazyMatch() - { - this.window_size = 2 * this.w_size; - Array.Clear((Array) this.head, 0, this.hash_size); - this.config = DeflateManager.Config.Lookup(this.compressionLevel); - this.SetDeflater(); - this.strstart = 0; - this.block_start = 0; - this.lookahead = 0; - this.match_length = this.prev_length = DeflateManager.MIN_MATCH - 1; - this.match_available = 0; - this.ins_h = 0; - } - - private void _InitializeTreeData() - { - this.treeLiterals.dyn_tree = this.dyn_ltree; - this.treeLiterals.staticTree = StaticTree.Literals; - this.treeDistances.dyn_tree = this.dyn_dtree; - this.treeDistances.staticTree = StaticTree.Distances; - this.treeBitLengths.dyn_tree = this.bl_tree; - this.treeBitLengths.staticTree = StaticTree.BitLengths; - this.bi_buf = (short) 0; - this.bi_valid = 0; - this.last_eob_len = 8; - this._InitializeBlocks(); - } - - internal void _InitializeBlocks() - { - for (int index = 0; index < InternalConstants.L_CODES; ++index) - this.dyn_ltree[index * 2] = (short) 0; - for (int index = 0; index < InternalConstants.D_CODES; ++index) - this.dyn_dtree[index * 2] = (short) 0; - for (int index = 0; index < InternalConstants.BL_CODES; ++index) - this.bl_tree[index * 2] = (short) 0; - this.dyn_ltree[DeflateManager.END_BLOCK * 2] = (short) 1; - this.opt_len = this.static_len = 0; - this.last_lit = this.matches = 0; - } - - internal void pqdownheap(short[] tree, int k) - { - int n = this.heap[k]; - for (int index = k << 1; index <= this.heap_len; index <<= 1) - { - if (index < this.heap_len && DeflateManager._IsSmaller(tree, this.heap[index + 1], this.heap[index], this.depth)) - ++index; - if (!DeflateManager._IsSmaller(tree, n, this.heap[index], this.depth)) - { - this.heap[k] = this.heap[index]; - k = index; - } - else - break; - } - this.heap[k] = n; - } - - internal static bool _IsSmaller(short[] tree, int n, int m, sbyte[] depth) - { - short num1 = tree[n * 2]; - short num2 = tree[m * 2]; - if ((int) num1 < (int) num2) - return true; - return (int) num1 == (int) num2 && (int) depth[n] <= (int) depth[m]; - } - - internal void scan_tree(short[] tree, int max_code) - { - int num1 = -1; - int num2 = (int) tree[1]; - int num3 = 0; - int num4 = 7; - int num5 = 4; - if (num2 == 0) - { - num4 = 138; - num5 = 3; - } - tree[(max_code + 1) * 2 + 1] = short.MaxValue; - for (int index = 0; index <= max_code; ++index) - { - int num6 = num2; - num2 = (int) tree[(index + 1) * 2 + 1]; - if (++num3 >= num4 || num6 != num2) - { - if (num3 < num5) - this.bl_tree[num6 * 2] = (short) ((int) this.bl_tree[num6 * 2] + num3); - else if (num6 != 0) - { - if (num6 != num1) - ++this.bl_tree[num6 * 2]; - ++this.bl_tree[InternalConstants.REP_3_6 * 2]; - } - else if (num3 <= 10) - ++this.bl_tree[InternalConstants.REPZ_3_10 * 2]; - else - ++this.bl_tree[InternalConstants.REPZ_11_138 * 2]; - num3 = 0; - num1 = num6; - if (num2 == 0) - { - num4 = 138; - num5 = 3; - } - else if (num6 == num2) - { - num4 = 6; - num5 = 3; - } - else - { - num4 = 7; - num5 = 4; - } - } - } - } - - internal int build_bl_tree() - { - this.scan_tree(this.dyn_ltree, this.treeLiterals.max_code); - this.scan_tree(this.dyn_dtree, this.treeDistances.max_code); - this.treeBitLengths.build_tree(this); - int index = InternalConstants.BL_CODES - 1; - while (index >= 3 && this.bl_tree[(int) Tree.bl_order[index] * 2 + 1] == (short) 0) - --index; - this.opt_len += 3 * (index + 1) + 5 + 5 + 4; - return index; - } - - internal void send_all_trees(int lcodes, int dcodes, int blcodes) - { - this.send_bits(lcodes - 257, 5); - this.send_bits(dcodes - 1, 5); - this.send_bits(blcodes - 4, 4); - for (int index = 0; index < blcodes; ++index) - this.send_bits((int) this.bl_tree[(int) Tree.bl_order[index] * 2 + 1], 3); - this.send_tree(this.dyn_ltree, lcodes - 1); - this.send_tree(this.dyn_dtree, dcodes - 1); - } - - internal void send_tree(short[] tree, int max_code) - { - int num1 = -1; - int num2 = (int) tree[1]; - int num3 = 0; - int num4 = 7; - int num5 = 4; - if (num2 == 0) - { - num4 = 138; - num5 = 3; - } - for (int index = 0; index <= max_code; ++index) - { - int c = num2; - num2 = (int) tree[(index + 1) * 2 + 1]; - if (++num3 >= num4 || c != num2) - { - if (num3 < num5) - { - do - { - this.send_code(c, this.bl_tree); - } - while (--num3 != 0); - } - else if (c != 0) - { - if (c != num1) - { - this.send_code(c, this.bl_tree); - --num3; - } - this.send_code(InternalConstants.REP_3_6, this.bl_tree); - this.send_bits(num3 - 3, 2); - } - else if (num3 <= 10) - { - this.send_code(InternalConstants.REPZ_3_10, this.bl_tree); - this.send_bits(num3 - 3, 3); - } - else - { - this.send_code(InternalConstants.REPZ_11_138, this.bl_tree); - this.send_bits(num3 - 11, 7); - } - num3 = 0; - num1 = c; - if (num2 == 0) - { - num4 = 138; - num5 = 3; - } - else if (c == num2) - { - num4 = 6; - num5 = 3; - } - else - { - num4 = 7; - num5 = 4; - } - } - } - } - - private void put_bytes(byte[] p, int start, int len) - { - Array.Copy((Array) p, start, (Array) this.pending, this.pendingCount, len); - this.pendingCount += len; - } - - internal void send_code(int c, short[] tree) - { - int index = c * 2; - this.send_bits((int) tree[index] & (int) ushort.MaxValue, (int) tree[index + 1] & (int) ushort.MaxValue); - } - - internal void send_bits(int value, int length) - { - int num = length; - if (this.bi_valid > DeflateManager.Buf_size - num) - { - this.bi_buf |= (short) (value << this.bi_valid & (int) ushort.MaxValue); - this.pending[this.pendingCount++] = (byte) this.bi_buf; - this.pending[this.pendingCount++] = (byte) ((uint) this.bi_buf >> 8); - this.bi_buf = (short) (value >>> DeflateManager.Buf_size - this.bi_valid); - this.bi_valid += num - DeflateManager.Buf_size; - } - else - { - this.bi_buf |= (short) (value << this.bi_valid & (int) ushort.MaxValue); - this.bi_valid += num; - } - } - - internal void _tr_align() - { - this.send_bits(DeflateManager.STATIC_TREES << 1, 3); - this.send_code(DeflateManager.END_BLOCK, StaticTree.lengthAndLiteralsTreeCodes); - this.bi_flush(); - if (1 + this.last_eob_len + 10 - this.bi_valid < 9) - { - this.send_bits(DeflateManager.STATIC_TREES << 1, 3); - this.send_code(DeflateManager.END_BLOCK, StaticTree.lengthAndLiteralsTreeCodes); - this.bi_flush(); - } - this.last_eob_len = 7; - } - - internal bool _tr_tally(int dist, int lc) - { - this.pending[this._distanceOffset + this.last_lit * 2] = (byte) (dist >>> 8); - this.pending[this._distanceOffset + this.last_lit * 2 + 1] = (byte) dist; - this.pending[this._lengthOffset + this.last_lit] = (byte) lc; - ++this.last_lit; - if (dist == 0) - { - ++this.dyn_ltree[lc * 2]; - } - else - { - ++this.matches; - --dist; - ++this.dyn_ltree[((int) Tree.LengthCode[lc] + InternalConstants.LITERALS + 1) * 2]; - ++this.dyn_dtree[Tree.DistanceCode(dist) * 2]; - } - if ((this.last_lit & 8191) == 0 && this.compressionLevel > CompressionLevel.Level2) - { - int num1 = this.last_lit << 3; - int num2 = this.strstart - this.block_start; - for (int index = 0; index < InternalConstants.D_CODES; ++index) - num1 = (int) ((long) num1 + (long) this.dyn_dtree[index * 2] * (5L + (long) Tree.ExtraDistanceBits[index])); - int num3 = num1 >> 3; - if (this.matches < this.last_lit / 2 && num3 < num2 / 2) - return true; - } - return this.last_lit == this.lit_bufsize - 1 || this.last_lit == this.lit_bufsize; - } - - internal void send_compressed_block(short[] ltree, short[] dtree) - { - int num1 = 0; - if (this.last_lit != 0) - { - do - { - int index1 = this._distanceOffset + num1 * 2; - int num2 = (int) this.pending[index1] << 8 & 65280 | (int) this.pending[index1 + 1] & (int) byte.MaxValue; - int c1 = (int) this.pending[this._lengthOffset + num1] & (int) byte.MaxValue; - ++num1; - if (num2 == 0) - { - this.send_code(c1, ltree); - } - else - { - int index2 = (int) Tree.LengthCode[c1]; - this.send_code(index2 + InternalConstants.LITERALS + 1, ltree); - int extraLengthBit = Tree.ExtraLengthBits[index2]; - if (extraLengthBit != 0) - this.send_bits(c1 - Tree.LengthBase[index2], extraLengthBit); - int dist = num2 - 1; - int c2 = Tree.DistanceCode(dist); - this.send_code(c2, dtree); - int extraDistanceBit = Tree.ExtraDistanceBits[c2]; - if (extraDistanceBit != 0) - this.send_bits(dist - Tree.DistanceBase[c2], extraDistanceBit); - } - } - while (num1 < this.last_lit); - } - this.send_code(DeflateManager.END_BLOCK, ltree); - this.last_eob_len = (int) ltree[DeflateManager.END_BLOCK * 2 + 1]; - } - - internal void set_data_type() - { - int num1 = 0; - int num2 = 0; - int num3 = 0; - for (; num1 < 7; ++num1) - num3 += (int) this.dyn_ltree[num1 * 2]; - for (; num1 < 128; ++num1) - num2 += (int) this.dyn_ltree[num1 * 2]; - for (; num1 < InternalConstants.LITERALS; ++num1) - num3 += (int) this.dyn_ltree[num1 * 2]; - this.data_type = num3 > num2 >> 2 ? (sbyte) DeflateManager.Z_BINARY : (sbyte) DeflateManager.Z_ASCII; - } - - internal void bi_flush() - { - if (this.bi_valid == 16) - { - this.pending[this.pendingCount++] = (byte) this.bi_buf; - this.pending[this.pendingCount++] = (byte) ((uint) this.bi_buf >> 8); - this.bi_buf = (short) 0; - this.bi_valid = 0; - } - else - { - if (this.bi_valid < 8) - return; - this.pending[this.pendingCount++] = (byte) this.bi_buf; - this.bi_buf >>= 8; - this.bi_valid -= 8; - } - } - - internal void bi_windup() - { - if (this.bi_valid > 8) - { - this.pending[this.pendingCount++] = (byte) this.bi_buf; - this.pending[this.pendingCount++] = (byte) ((uint) this.bi_buf >> 8); - } - else if (this.bi_valid > 0) - this.pending[this.pendingCount++] = (byte) this.bi_buf; - this.bi_buf = (short) 0; - this.bi_valid = 0; - } - - internal void copy_block(int buf, int len, bool header) - { - this.bi_windup(); - this.last_eob_len = 8; - if (header) - { - this.pending[this.pendingCount++] = (byte) len; - this.pending[this.pendingCount++] = (byte) (len >> 8); - this.pending[this.pendingCount++] = (byte) ~len; - this.pending[this.pendingCount++] = (byte) (~len >> 8); - } - this.put_bytes(this.window, buf, len); - } - - internal void flush_block_only(bool eof) - { - this._tr_flush_block(this.block_start >= 0 ? this.block_start : -1, this.strstart - this.block_start, eof); - this.block_start = this.strstart; - this._codec.flush_pending(); - } - - internal BlockState DeflateNone(FlushType flush) - { - int num1 = (int) ushort.MaxValue; - if (num1 > this.pending.Length - 5) - num1 = this.pending.Length - 5; - do - { - do - { - if (this.lookahead <= 1) - { - this._fillWindow(); - if (this.lookahead == 0 && flush == FlushType.None) - return BlockState.NeedMore; - if (this.lookahead == 0) - goto label_12; - } - this.strstart += this.lookahead; - this.lookahead = 0; - int num2 = this.block_start + num1; - if (this.strstart == 0 || this.strstart >= num2) - { - this.lookahead = this.strstart - num2; - this.strstart = num2; - this.flush_block_only(false); - if (this._codec.AvailableBytesOut == 0) - return BlockState.NeedMore; - } - } - while (this.strstart - this.block_start < this.w_size - DeflateManager.MIN_LOOKAHEAD); - this.flush_block_only(false); - } - while (this._codec.AvailableBytesOut != 0); - return BlockState.NeedMore; -label_12: - this.flush_block_only(flush == FlushType.Finish); - return this._codec.AvailableBytesOut == 0 ? (flush != FlushType.Finish ? BlockState.NeedMore : BlockState.FinishStarted) : (flush != FlushType.Finish ? BlockState.BlockDone : BlockState.FinishDone); - } - - internal void _tr_stored_block(int buf, int stored_len, bool eof) - { - this.send_bits((DeflateManager.STORED_BLOCK << 1) + (eof ? 1 : 0), 3); - this.copy_block(buf, stored_len, true); - } - - internal void _tr_flush_block(int buf, int stored_len, bool eof) - { - int num1 = 0; - int num2; - int num3; - if (this.compressionLevel > CompressionLevel.None) - { - if ((int) this.data_type == DeflateManager.Z_UNKNOWN) - this.set_data_type(); - this.treeLiterals.build_tree(this); - this.treeDistances.build_tree(this); - num1 = this.build_bl_tree(); - num2 = this.opt_len + 3 + 7 >> 3; - num3 = this.static_len + 3 + 7 >> 3; - if (num3 <= num2) - num2 = num3; - } - else - num2 = num3 = stored_len + 5; - if (stored_len + 4 <= num2 && buf != -1) - this._tr_stored_block(buf, stored_len, eof); - else if (num3 == num2) - { - this.send_bits((DeflateManager.STATIC_TREES << 1) + (eof ? 1 : 0), 3); - this.send_compressed_block(StaticTree.lengthAndLiteralsTreeCodes, StaticTree.distTreeCodes); - } - else - { - this.send_bits((DeflateManager.DYN_TREES << 1) + (eof ? 1 : 0), 3); - this.send_all_trees(this.treeLiterals.max_code + 1, this.treeDistances.max_code + 1, num1 + 1); - this.send_compressed_block(this.dyn_ltree, this.dyn_dtree); - } - this._InitializeBlocks(); - if (!eof) - return; - this.bi_windup(); - } - - private void _fillWindow() - { - do - { - int size = this.window_size - this.lookahead - this.strstart; - if (size == 0 && this.strstart == 0 && this.lookahead == 0) - size = this.w_size; - else if (size == -1) - --size; - else if (this.strstart >= this.w_size + this.w_size - DeflateManager.MIN_LOOKAHEAD) - { - Array.Copy((Array) this.window, this.w_size, (Array) this.window, 0, this.w_size); - this.match_start -= this.w_size; - this.strstart -= this.w_size; - this.block_start -= this.w_size; - int hashSize = this.hash_size; - int index1 = hashSize; - do - { - int num = (int) this.head[--index1] & (int) ushort.MaxValue; - this.head[index1] = num >= this.w_size ? (short) (num - this.w_size) : (short) 0; - } - while (--hashSize != 0); - int wSize = this.w_size; - int index2 = wSize; - do - { - int num = (int) this.prev[--index2] & (int) ushort.MaxValue; - this.prev[index2] = num >= this.w_size ? (short) (num - this.w_size) : (short) 0; - } - while (--wSize != 0); - size += this.w_size; - } - if (this._codec.AvailableBytesIn == 0) - break; - this.lookahead += this._codec.read_buf(this.window, this.strstart + this.lookahead, size); - if (this.lookahead >= DeflateManager.MIN_MATCH) - { - this.ins_h = (int) this.window[this.strstart] & (int) byte.MaxValue; - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[this.strstart + 1] & (int) byte.MaxValue) & this.hash_mask; - } - } - while (this.lookahead < DeflateManager.MIN_LOOKAHEAD && this._codec.AvailableBytesIn != 0); - } - - internal BlockState DeflateFast(FlushType flush) - { - int cur_match = 0; - do - { - bool flag; - do - { - if (this.lookahead < DeflateManager.MIN_LOOKAHEAD) - { - this._fillWindow(); - if (this.lookahead < DeflateManager.MIN_LOOKAHEAD && flush == FlushType.None) - return BlockState.NeedMore; - if (this.lookahead == 0) - goto label_19; - } - if (this.lookahead >= DeflateManager.MIN_MATCH) - { - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[this.strstart + (DeflateManager.MIN_MATCH - 1)] & (int) byte.MaxValue) & this.hash_mask; - cur_match = (int) this.head[this.ins_h] & (int) ushort.MaxValue; - this.prev[this.strstart & this.w_mask] = this.head[this.ins_h]; - this.head[this.ins_h] = (short) this.strstart; - } - if (cur_match != 0 && (this.strstart - cur_match & (int) ushort.MaxValue) <= this.w_size - DeflateManager.MIN_LOOKAHEAD && this.compressionStrategy != CompressionStrategy.HuffmanOnly) - this.match_length = this.longest_match(cur_match); - if (this.match_length >= DeflateManager.MIN_MATCH) - { - flag = this._tr_tally(this.strstart - this.match_start, this.match_length - DeflateManager.MIN_MATCH); - this.lookahead -= this.match_length; - if (this.match_length <= this.config.MaxLazy && this.lookahead >= DeflateManager.MIN_MATCH) - { - --this.match_length; - do - { - ++this.strstart; - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[this.strstart + (DeflateManager.MIN_MATCH - 1)] & (int) byte.MaxValue) & this.hash_mask; - cur_match = (int) this.head[this.ins_h] & (int) ushort.MaxValue; - this.prev[this.strstart & this.w_mask] = this.head[this.ins_h]; - this.head[this.ins_h] = (short) this.strstart; - } - while (--this.match_length != 0); - ++this.strstart; - } - else - { - this.strstart += this.match_length; - this.match_length = 0; - this.ins_h = (int) this.window[this.strstart] & (int) byte.MaxValue; - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[this.strstart + 1] & (int) byte.MaxValue) & this.hash_mask; - } - } - else - { - flag = this._tr_tally(0, (int) this.window[this.strstart] & (int) byte.MaxValue); - --this.lookahead; - ++this.strstart; - } - } - while (!flag); - this.flush_block_only(false); - } - while (this._codec.AvailableBytesOut != 0); - return BlockState.NeedMore; -label_19: - this.flush_block_only(flush == FlushType.Finish); - return this._codec.AvailableBytesOut == 0 ? (flush == FlushType.Finish ? BlockState.FinishStarted : BlockState.NeedMore) : (flush != FlushType.Finish ? BlockState.BlockDone : BlockState.FinishDone); - } - - internal BlockState DeflateSlow(FlushType flush) - { - int cur_match = 0; - while (true) - { - do - { - if (this.lookahead < DeflateManager.MIN_LOOKAHEAD) - { - this._fillWindow(); - if (this.lookahead < DeflateManager.MIN_LOOKAHEAD && flush == FlushType.None) - return BlockState.NeedMore; - if (this.lookahead == 0) - goto label_26; - } - if (this.lookahead >= DeflateManager.MIN_MATCH) - { - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[this.strstart + (DeflateManager.MIN_MATCH - 1)] & (int) byte.MaxValue) & this.hash_mask; - cur_match = (int) this.head[this.ins_h] & (int) ushort.MaxValue; - this.prev[this.strstart & this.w_mask] = this.head[this.ins_h]; - this.head[this.ins_h] = (short) this.strstart; - } - this.prev_length = this.match_length; - this.prev_match = this.match_start; - this.match_length = DeflateManager.MIN_MATCH - 1; - if (cur_match != 0 && this.prev_length < this.config.MaxLazy && (this.strstart - cur_match & (int) ushort.MaxValue) <= this.w_size - DeflateManager.MIN_LOOKAHEAD) - { - if (this.compressionStrategy != CompressionStrategy.HuffmanOnly) - this.match_length = this.longest_match(cur_match); - if (this.match_length <= 5 && (this.compressionStrategy == CompressionStrategy.Filtered || this.match_length == DeflateManager.MIN_MATCH && this.strstart - this.match_start > 4096)) - this.match_length = DeflateManager.MIN_MATCH - 1; - } - if (this.prev_length >= DeflateManager.MIN_MATCH && this.match_length <= this.prev_length) - { - int num = this.strstart + this.lookahead - DeflateManager.MIN_MATCH; - bool flag = this._tr_tally(this.strstart - 1 - this.prev_match, this.prev_length - DeflateManager.MIN_MATCH); - this.lookahead -= this.prev_length - 1; - this.prev_length -= 2; - do - { - if (++this.strstart <= num) - { - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[this.strstart + (DeflateManager.MIN_MATCH - 1)] & (int) byte.MaxValue) & this.hash_mask; - cur_match = (int) this.head[this.ins_h] & (int) ushort.MaxValue; - this.prev[this.strstart & this.w_mask] = this.head[this.ins_h]; - this.head[this.ins_h] = (short) this.strstart; - } - } - while (--this.prev_length != 0); - this.match_available = 0; - this.match_length = DeflateManager.MIN_MATCH - 1; - ++this.strstart; - if (flag) - { - this.flush_block_only(false); - if (this._codec.AvailableBytesOut == 0) - return BlockState.NeedMore; - } - } - else if (this.match_available != 0) - { - if (this._tr_tally(0, (int) this.window[this.strstart - 1] & (int) byte.MaxValue)) - this.flush_block_only(false); - ++this.strstart; - --this.lookahead; - } - else - goto label_25; - } - while (this._codec.AvailableBytesOut != 0); - break; -label_25: - this.match_available = 1; - ++this.strstart; - --this.lookahead; - } - return BlockState.NeedMore; -label_26: - if (this.match_available != 0) - { - this._tr_tally(0, (int) this.window[this.strstart - 1] & (int) byte.MaxValue); - this.match_available = 0; - } - this.flush_block_only(flush == FlushType.Finish); - return this._codec.AvailableBytesOut == 0 ? (flush == FlushType.Finish ? BlockState.FinishStarted : BlockState.NeedMore) : (flush != FlushType.Finish ? BlockState.BlockDone : BlockState.FinishDone); - } - - internal int longest_match(int cur_match) - { - int maxChainLength = this.config.MaxChainLength; - int index1 = this.strstart; - int num1 = this.prev_length; - int num2 = this.strstart > this.w_size - DeflateManager.MIN_LOOKAHEAD ? this.strstart - (this.w_size - DeflateManager.MIN_LOOKAHEAD) : 0; - int num3 = this.config.NiceLength; - int wMask = this.w_mask; - int num4 = this.strstart + DeflateManager.MAX_MATCH; - byte num5 = this.window[index1 + num1 - 1]; - byte num6 = this.window[index1 + num1]; - if (this.prev_length >= this.config.GoodLength) - maxChainLength >>= 2; - if (num3 > this.lookahead) - num3 = this.lookahead; - do - { - int index2 = cur_match; - int num7; - if ((int) this.window[index2 + num1] == (int) num6 && (int) this.window[index2 + num1 - 1] == (int) num5 && (int) this.window[index2] == (int) this.window[index1] && (int) this.window[num7 = index2 + 1] == (int) this.window[index1 + 1]) - { - int num8 = index1 + 2; - int num9 = num7 + 1; - int num10; - int num11; - int num12; - int num13; - int num14; - int num15; - int num16; - do - ; - while ((int) this.window[++num8] == (int) this.window[num10 = num9 + 1] && (int) this.window[++num8] == (int) this.window[num11 = num10 + 1] && (int) this.window[++num8] == (int) this.window[num12 = num11 + 1] && (int) this.window[++num8] == (int) this.window[num13 = num12 + 1] && (int) this.window[++num8] == (int) this.window[num14 = num13 + 1] && (int) this.window[++num8] == (int) this.window[num15 = num14 + 1] && (int) this.window[++num8] == (int) this.window[num16 = num15 + 1] && (int) this.window[++num8] == (int) this.window[num9 = num16 + 1] && num8 < num4); - int num17 = DeflateManager.MAX_MATCH - (num4 - num8); - index1 = num4 - DeflateManager.MAX_MATCH; - if (num17 > num1) - { - this.match_start = cur_match; - num1 = num17; - if (num17 < num3) - { - num5 = this.window[index1 + num1 - 1]; - num6 = this.window[index1 + num1]; - } - else - break; - } - } - } - while ((cur_match = (int) this.prev[cur_match & wMask] & (int) ushort.MaxValue) > num2 && --maxChainLength != 0); - return num1 <= this.lookahead ? num1 : this.lookahead; - } - - internal bool WantRfc1950HeaderBytes - { - get => this._WantRfc1950HeaderBytes; - set => this._WantRfc1950HeaderBytes = value; - } - - internal int Initialize(ZlibCodec codec, CompressionLevel level) => this.Initialize(codec, level, 15); - - internal int Initialize(ZlibCodec codec, CompressionLevel level, int bits) => this.Initialize(codec, level, bits, DeflateManager.MEM_LEVEL_DEFAULT, CompressionStrategy.Default); - - internal int Initialize( - ZlibCodec codec, - CompressionLevel level, - int bits, - CompressionStrategy compressionStrategy) - { - return this.Initialize(codec, level, bits, DeflateManager.MEM_LEVEL_DEFAULT, compressionStrategy); - } - - internal int Initialize( - ZlibCodec codec, - CompressionLevel level, - int windowBits, - int memLevel, - CompressionStrategy strategy) - { - this._codec = codec; - this._codec.Message = (string) null; - if (windowBits < 9 || windowBits > 15) - throw new ZlibException("windowBits must be in the range 9..15."); - if (memLevel < 1 || memLevel > DeflateManager.MEM_LEVEL_MAX) - throw new ZlibException(string.Format("memLevel must be in the range 1.. {0}", (object) DeflateManager.MEM_LEVEL_MAX)); - this._codec.dstate = this; - this.w_bits = windowBits; - this.w_size = 1 << this.w_bits; - this.w_mask = this.w_size - 1; - this.hash_bits = memLevel + 7; - this.hash_size = 1 << this.hash_bits; - this.hash_mask = this.hash_size - 1; - this.hash_shift = (this.hash_bits + DeflateManager.MIN_MATCH - 1) / DeflateManager.MIN_MATCH; - this.window = new byte[this.w_size * 2]; - this.prev = new short[this.w_size]; - this.head = new short[this.hash_size]; - this.lit_bufsize = 1 << memLevel + 6; - this.pending = new byte[this.lit_bufsize * 4]; - this._distanceOffset = this.lit_bufsize; - this._lengthOffset = 3 * this.lit_bufsize; - this.compressionLevel = level; - this.compressionStrategy = strategy; - this.Reset(); - return 0; - } - - internal void Reset() - { - this._codec.TotalBytesIn = this._codec.TotalBytesOut = 0L; - this._codec.Message = (string) null; - this.pendingCount = 0; - this.nextPending = 0; - this.Rfc1950BytesEmitted = false; - this.status = this.WantRfc1950HeaderBytes ? DeflateManager.INIT_STATE : DeflateManager.BUSY_STATE; - this._codec._Adler32 = Adler.Adler32(0U, (byte[]) null, 0, 0); - this.last_flush = 0; - this._InitializeTreeData(); - this._InitializeLazyMatch(); - } - - internal int End() - { - if (this.status != DeflateManager.INIT_STATE && this.status != DeflateManager.BUSY_STATE && this.status != DeflateManager.FINISH_STATE) - return -2; - this.pending = (byte[]) null; - this.head = (short[]) null; - this.prev = (short[]) null; - this.window = (byte[]) null; - return this.status != DeflateManager.BUSY_STATE ? 0 : -3; - } - - private void SetDeflater() - { - switch (this.config.Flavor) - { - case DeflateFlavor.Store: - this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateNone); - break; - case DeflateFlavor.Fast: - this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateFast); - break; - case DeflateFlavor.Slow: - this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateSlow); - break; - } - } - - internal int SetParams(CompressionLevel level, CompressionStrategy strategy) - { - int num = 0; - if (this.compressionLevel != level) - { - DeflateManager.Config config = DeflateManager.Config.Lookup(level); - if (config.Flavor != this.config.Flavor && this._codec.TotalBytesIn != 0L) - num = this._codec.Deflate(FlushType.Partial); - this.compressionLevel = level; - this.config = config; - this.SetDeflater(); - } - this.compressionStrategy = strategy; - return num; - } - - internal int SetDictionary(byte[] dictionary) - { - int length = dictionary.Length; - int sourceIndex = 0; - if (dictionary == null || this.status != DeflateManager.INIT_STATE) - throw new ZlibException("Stream error."); - this._codec._Adler32 = Adler.Adler32(this._codec._Adler32, dictionary, 0, dictionary.Length); - if (length < DeflateManager.MIN_MATCH) - return 0; - if (length > this.w_size - DeflateManager.MIN_LOOKAHEAD) - { - length = this.w_size - DeflateManager.MIN_LOOKAHEAD; - sourceIndex = dictionary.Length - length; - } - Array.Copy((Array) dictionary, sourceIndex, (Array) this.window, 0, length); - this.strstart = length; - this.block_start = length; - this.ins_h = (int) this.window[0] & (int) byte.MaxValue; - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[1] & (int) byte.MaxValue) & this.hash_mask; - for (int index = 0; index <= length - DeflateManager.MIN_MATCH; ++index) - { - this.ins_h = (this.ins_h << this.hash_shift ^ (int) this.window[index + (DeflateManager.MIN_MATCH - 1)] & (int) byte.MaxValue) & this.hash_mask; - this.prev[index & this.w_mask] = this.head[this.ins_h]; - this.head[this.ins_h] = (short) index; - } - return 0; - } - - internal int Deflate(FlushType flush) - { - if (this._codec.OutputBuffer == null || this._codec.InputBuffer == null && this._codec.AvailableBytesIn != 0 || this.status == DeflateManager.FINISH_STATE && flush != FlushType.Finish) - { - this._codec.Message = DeflateManager._ErrorMessage[4]; - throw new ZlibException(string.Format("Something is fishy. [{0}]", (object) this._codec.Message)); - } - if (this._codec.AvailableBytesOut == 0) - { - this._codec.Message = DeflateManager._ErrorMessage[7]; - throw new ZlibException("OutputBuffer is full (AvailableBytesOut == 0)"); - } - int lastFlush = this.last_flush; - this.last_flush = (int) flush; - if (this.status == DeflateManager.INIT_STATE) - { - int num1 = DeflateManager.Z_DEFLATED + (this.w_bits - 8 << 4) << 8; - int num2 = (int) (this.compressionLevel - 1 & (CompressionLevel) 255) >> 1; - if (num2 > 3) - num2 = 3; - int num3 = num1 | num2 << 6; - if (this.strstart != 0) - num3 |= DeflateManager.PRESET_DICT; - int num4 = num3 + (31 - num3 % 31); - this.status = DeflateManager.BUSY_STATE; - this.pending[this.pendingCount++] = (byte) (num4 >> 8); - this.pending[this.pendingCount++] = (byte) num4; - if (this.strstart != 0) - { - this.pending[this.pendingCount++] = (byte) ((this._codec._Adler32 & 4278190080U) >> 24); - this.pending[this.pendingCount++] = (byte) ((this._codec._Adler32 & 16711680U) >> 16); - this.pending[this.pendingCount++] = (byte) ((this._codec._Adler32 & 65280U) >> 8); - this.pending[this.pendingCount++] = (byte) (this._codec._Adler32 & (uint) byte.MaxValue); - } - this._codec._Adler32 = Adler.Adler32(0U, (byte[]) null, 0, 0); - } - if (this.pendingCount != 0) - { - this._codec.flush_pending(); - if (this._codec.AvailableBytesOut == 0) - { - this.last_flush = -1; - return 0; - } - } - else if (this._codec.AvailableBytesIn == 0 && flush <= (FlushType) lastFlush && flush != FlushType.Finish) - return 0; - if (this.status == DeflateManager.FINISH_STATE && this._codec.AvailableBytesIn != 0) - { - this._codec.Message = DeflateManager._ErrorMessage[7]; - throw new ZlibException("status == FINISH_STATE && _codec.AvailableBytesIn != 0"); - } - if (this._codec.AvailableBytesIn != 0 || this.lookahead != 0 || flush != FlushType.None && this.status != DeflateManager.FINISH_STATE) - { - BlockState blockState = this.DeflateFunction(flush); - if (blockState == BlockState.FinishStarted || blockState == BlockState.FinishDone) - this.status = DeflateManager.FINISH_STATE; - if (blockState == BlockState.NeedMore || blockState == BlockState.FinishStarted) - { - if (this._codec.AvailableBytesOut == 0) - this.last_flush = -1; - return 0; - } - if (blockState == BlockState.BlockDone) - { - if (flush == FlushType.Partial) - { - this._tr_align(); - } - else - { - this._tr_stored_block(0, 0, false); - if (flush == FlushType.Full) - { - for (int index = 0; index < this.hash_size; ++index) - this.head[index] = (short) 0; - } - } - this._codec.flush_pending(); - if (this._codec.AvailableBytesOut == 0) - { - this.last_flush = -1; - return 0; - } - } - } - if (flush != FlushType.Finish) - return 0; - if (!this.WantRfc1950HeaderBytes || this.Rfc1950BytesEmitted) - return 1; - this.pending[this.pendingCount++] = (byte) ((this._codec._Adler32 & 4278190080U) >> 24); - this.pending[this.pendingCount++] = (byte) ((this._codec._Adler32 & 16711680U) >> 16); - this.pending[this.pendingCount++] = (byte) ((this._codec._Adler32 & 65280U) >> 8); - this.pending[this.pendingCount++] = (byte) (this._codec._Adler32 & (uint) byte.MaxValue); - this._codec.flush_pending(); - this.Rfc1950BytesEmitted = true; - return this.pendingCount == 0 ? 1 : 0; - } - - internal delegate BlockState CompressFunc(FlushType flush); - - internal class Config - { - internal int GoodLength; - internal int MaxLazy; - internal int NiceLength; - internal int MaxChainLength; - internal DeflateFlavor Flavor; - private static readonly DeflateManager.Config[] Table = new DeflateManager.Config[10] - { - new DeflateManager.Config(0, 0, 0, 0, DeflateFlavor.Store), - new DeflateManager.Config(4, 4, 8, 4, DeflateFlavor.Fast), - new DeflateManager.Config(4, 5, 16, 8, DeflateFlavor.Fast), - new DeflateManager.Config(4, 6, 32, 32, DeflateFlavor.Fast), - new DeflateManager.Config(4, 4, 16, 16, DeflateFlavor.Slow), - new DeflateManager.Config(8, 16, 32, 32, DeflateFlavor.Slow), - new DeflateManager.Config(8, 16, 128, 128, DeflateFlavor.Slow), - new DeflateManager.Config(8, 32, 128, 256, DeflateFlavor.Slow), - new DeflateManager.Config(32, 128, 258, 1024, DeflateFlavor.Slow), - new DeflateManager.Config(32, 258, 258, 4096, DeflateFlavor.Slow) - }; - - private Config( - int goodLength, - int maxLazy, - int niceLength, - int maxChainLength, - DeflateFlavor flavor) - { - this.GoodLength = goodLength; - this.MaxLazy = maxLazy; - this.NiceLength = niceLength; - this.MaxChainLength = maxChainLength; - this.Flavor = flavor; - } - - public static DeflateManager.Config Lookup(CompressionLevel level) => DeflateManager.Config.Table[(int) level]; - } - } -} diff --git a/Src/IonicZipFiles/Zlib/DeflateStream.cs b/Src/IonicZipFiles/Zlib/DeflateStream.cs deleted file mode 100644 index f3501006..00000000 --- a/Src/IonicZipFiles/Zlib/DeflateStream.cs +++ /dev/null @@ -1,196 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.DeflateStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Zlib -{ - public class DeflateStream : Stream - { - internal ZlibBaseStream _baseStream; - internal Stream _innerStream; - private bool _disposed; - - public DeflateStream(Stream stream, CompressionMode mode) - : this(stream, mode, CompressionLevel.Default, false) - { - } - - public DeflateStream(Stream stream, CompressionMode mode, CompressionLevel level) - : this(stream, mode, level, false) - { - } - - public DeflateStream(Stream stream, CompressionMode mode, bool leaveOpen) - : this(stream, mode, CompressionLevel.Default, leaveOpen) - { - } - - public DeflateStream( - Stream stream, - CompressionMode mode, - CompressionLevel level, - bool leaveOpen) - { - this._innerStream = stream; - this._baseStream = new ZlibBaseStream(stream, mode, level, ZlibStreamFlavor.DEFLATE, leaveOpen); - } - - public virtual FlushType FlushMode - { - get => this._baseStream._flushMode; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - this._baseStream._flushMode = value; - } - } - - public int BufferSize - { - get => this._baseStream._bufferSize; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - if (this._baseStream._workingBuffer != null) - throw new ZlibException("The working buffer is already set."); - this._baseStream._bufferSize = value >= 1024 ? value : throw new ZlibException(string.Format("Don't be silly. {0} bytes?? Use a bigger buffer, at least {1}.", (object) value, (object) 1024)); - } - } - - public CompressionStrategy Strategy - { - get => this._baseStream.Strategy; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - this._baseStream.Strategy = value; - } - } - - public virtual long TotalIn => this._baseStream._z.TotalBytesIn; - - public virtual long TotalOut => this._baseStream._z.TotalBytesOut; - - protected override void Dispose(bool disposing) - { - try - { - if (this._disposed) - return; - if (disposing && this._baseStream != null) - this._baseStream.Close(); - this._disposed = true; - } - finally - { - base.Dispose(disposing); - } - } - - public override bool CanRead - { - get - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - return this._baseStream._stream.CanRead; - } - } - - public override bool CanSeek => false; - - public override bool CanWrite - { - get - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - return this._baseStream._stream.CanWrite; - } - } - - public override void Flush() - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - this._baseStream.Flush(); - } - - public override long Length => throw new NotImplementedException(); - - public override long Position - { - get - { - if (this._baseStream._streamMode == ZlibBaseStream.StreamMode.Writer) - return this._baseStream._z.TotalBytesOut; - return this._baseStream._streamMode == ZlibBaseStream.StreamMode.Reader ? this._baseStream._z.TotalBytesIn : 0L; - } - set => throw new NotImplementedException(); - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - return this._baseStream.Read(buffer, offset, count); - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotImplementedException(); - - public override void SetLength(long value) => throw new NotImplementedException(); - - public override void Write(byte[] buffer, int offset, int count) - { - if (this._disposed) - throw new ObjectDisposedException(nameof (DeflateStream)); - this._baseStream.Write(buffer, offset, count); - } - - public static byte[] CompressString(string s) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - Stream compressor = (Stream) new DeflateStream((Stream) memoryStream, CompressionMode.Compress, CompressionLevel.BestCompression); - ZlibBaseStream.CompressString(s, compressor); - return memoryStream.ToArray(); - } - } - - public static byte[] CompressBuffer(byte[] b) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - Stream compressor = (Stream) new DeflateStream((Stream) memoryStream, CompressionMode.Compress, CompressionLevel.BestCompression); - ZlibBaseStream.CompressBuffer(b, compressor); - return memoryStream.ToArray(); - } - } - - public static string UncompressString(byte[] compressed) - { - using (MemoryStream memoryStream = new MemoryStream(compressed)) - { - Stream decompressor = (Stream) new DeflateStream((Stream) memoryStream, CompressionMode.Decompress); - return ZlibBaseStream.UncompressString(compressed, decompressor); - } - } - - public static byte[] UncompressBuffer(byte[] compressed) - { - using (MemoryStream memoryStream = new MemoryStream(compressed)) - { - Stream decompressor = (Stream) new DeflateStream((Stream) memoryStream, CompressionMode.Decompress); - return ZlibBaseStream.UncompressBuffer(compressed, decompressor); - } - } - } -} diff --git a/Src/IonicZipFiles/Zlib/FlushType.cs b/Src/IonicZipFiles/Zlib/FlushType.cs deleted file mode 100644 index 36cf6e57..00000000 --- a/Src/IonicZipFiles/Zlib/FlushType.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.FlushType -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - public enum FlushType - { - None, - Partial, - Sync, - Full, - Finish, - } -} diff --git a/Src/IonicZipFiles/Zlib/GZipStream.cs b/Src/IonicZipFiles/Zlib/GZipStream.cs deleted file mode 100644 index 93dc9e69..00000000 --- a/Src/IonicZipFiles/Zlib/GZipStream.cs +++ /dev/null @@ -1,298 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.GZipStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; -using System.Text; - -namespace Ionic.Zlib -{ - public class GZipStream : Stream - { - public DateTime? LastModified; - private int _headerByteCount; - internal ZlibBaseStream _baseStream; - private bool _disposed; - private bool _firstReadDone; - private string _FileName; - private string _Comment; - private int _Crc32; - internal static readonly DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); - internal static readonly Encoding iso8859dash1 = Encoding.GetEncoding("iso-8859-1"); - - public string Comment - { - get => this._Comment; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - this._Comment = value; - } - } - - public string FileName - { - get => this._FileName; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - this._FileName = value; - if (this._FileName == null) - return; - if (this._FileName.IndexOf("/") != -1) - this._FileName = this._FileName.Replace("/", "\\"); - if (this._FileName.EndsWith("\\")) - throw new Exception("Illegal filename"); - if (this._FileName.IndexOf("\\") == -1) - return; - this._FileName = Path.GetFileName(this._FileName); - } - } - - public int Crc32 => this._Crc32; - - public GZipStream(Stream stream, CompressionMode mode) - : this(stream, mode, CompressionLevel.Default, false) - { - } - - public GZipStream(Stream stream, CompressionMode mode, CompressionLevel level) - : this(stream, mode, level, false) - { - } - - public GZipStream(Stream stream, CompressionMode mode, bool leaveOpen) - : this(stream, mode, CompressionLevel.Default, leaveOpen) - { - } - - public GZipStream(Stream stream, CompressionMode mode, CompressionLevel level, bool leaveOpen) => this._baseStream = new ZlibBaseStream(stream, mode, level, ZlibStreamFlavor.GZIP, leaveOpen); - - public virtual FlushType FlushMode - { - get => this._baseStream._flushMode; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - this._baseStream._flushMode = value; - } - } - - public int BufferSize - { - get => this._baseStream._bufferSize; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - if (this._baseStream._workingBuffer != null) - throw new ZlibException("The working buffer is already set."); - this._baseStream._bufferSize = value >= 1024 ? value : throw new ZlibException(string.Format("Don't be silly. {0} bytes?? Use a bigger buffer, at least {1}.", (object) value, (object) 1024)); - } - } - - public virtual long TotalIn => this._baseStream._z.TotalBytesIn; - - public virtual long TotalOut => this._baseStream._z.TotalBytesOut; - - protected override void Dispose(bool disposing) - { - try - { - if (this._disposed) - return; - if (disposing && this._baseStream != null) - { - this._baseStream.Close(); - this._Crc32 = this._baseStream.Crc32; - } - this._disposed = true; - } - finally - { - base.Dispose(disposing); - } - } - - public override bool CanRead - { - get - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - return this._baseStream._stream.CanRead; - } - } - - public override bool CanSeek => false; - - public override bool CanWrite - { - get - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - return this._baseStream._stream.CanWrite; - } - } - - public override void Flush() - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - this._baseStream.Flush(); - } - - public override long Length => throw new NotImplementedException(); - - public override long Position - { - get - { - if (this._baseStream._streamMode == ZlibBaseStream.StreamMode.Writer) - return this._baseStream._z.TotalBytesOut + (long) this._headerByteCount; - return this._baseStream._streamMode == ZlibBaseStream.StreamMode.Reader ? this._baseStream._z.TotalBytesIn + (long) this._baseStream._gzipHeaderByteCount : 0L; - } - set => throw new NotImplementedException(); - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - int num = this._baseStream.Read(buffer, offset, count); - if (!this._firstReadDone) - { - this._firstReadDone = true; - this.FileName = this._baseStream._GzipFileName; - this.Comment = this._baseStream._GzipComment; - } - return num; - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotImplementedException(); - - public override void SetLength(long value) => throw new NotImplementedException(); - - public override void Write(byte[] buffer, int offset, int count) - { - if (this._disposed) - throw new ObjectDisposedException(nameof (GZipStream)); - if (this._baseStream._streamMode == ZlibBaseStream.StreamMode.Undefined) - { - if (!this._baseStream._wantCompress) - throw new InvalidOperationException(); - this._headerByteCount = this.EmitHeader(); - } - this._baseStream.Write(buffer, offset, count); - } - - private int EmitHeader() - { - byte[] bytes1 = this.Comment == null ? (byte[]) null : GZipStream.iso8859dash1.GetBytes(this.Comment); - byte[] bytes2 = this.FileName == null ? (byte[]) null : GZipStream.iso8859dash1.GetBytes(this.FileName); - int num1 = this.Comment == null ? 0 : bytes1.Length + 1; - int num2 = this.FileName == null ? 0 : bytes2.Length + 1; - byte[] numArray1 = new byte[10 + num1 + num2]; - int num3 = 0; - byte[] numArray2 = numArray1; - int index1 = num3; - int num4 = index1 + 1; - numArray2[index1] = (byte) 31; - byte[] numArray3 = numArray1; - int index2 = num4; - int num5 = index2 + 1; - numArray3[index2] = (byte) 139; - byte[] numArray4 = numArray1; - int index3 = num5; - int num6 = index3 + 1; - numArray4[index3] = (byte) 8; - byte num7 = 0; - if (this.Comment != null) - num7 ^= (byte) 16; - if (this.FileName != null) - num7 ^= (byte) 8; - byte[] numArray5 = numArray1; - int index4 = num6; - int destinationIndex1 = index4 + 1; - int num8 = (int) num7; - numArray5[index4] = (byte) num8; - if (!this.LastModified.HasValue) - this.LastModified = new DateTime?(DateTime.Now); - Array.Copy((Array) BitConverter.GetBytes((int) (this.LastModified.Value - GZipStream._unixEpoch).TotalSeconds), 0, (Array) numArray1, destinationIndex1, 4); - int num9 = destinationIndex1 + 4; - byte[] numArray6 = numArray1; - int index5 = num9; - int num10 = index5 + 1; - numArray6[index5] = (byte) 0; - byte[] numArray7 = numArray1; - int index6 = num10; - int destinationIndex2 = index6 + 1; - numArray7[index6] = byte.MaxValue; - if (num2 != 0) - { - Array.Copy((Array) bytes2, 0, (Array) numArray1, destinationIndex2, num2 - 1); - int num11 = destinationIndex2 + (num2 - 1); - byte[] numArray8 = numArray1; - int index7 = num11; - destinationIndex2 = index7 + 1; - numArray8[index7] = (byte) 0; - } - if (num1 != 0) - { - Array.Copy((Array) bytes1, 0, (Array) numArray1, destinationIndex2, num1 - 1); - int num12 = destinationIndex2 + (num1 - 1); - byte[] numArray9 = numArray1; - int index8 = num12; - int num13 = index8 + 1; - numArray9[index8] = (byte) 0; - } - this._baseStream._stream.Write(numArray1, 0, numArray1.Length); - return numArray1.Length; - } - - public static byte[] CompressString(string s) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - Stream compressor = (Stream) new GZipStream((Stream) memoryStream, CompressionMode.Compress, CompressionLevel.BestCompression); - ZlibBaseStream.CompressString(s, compressor); - return memoryStream.ToArray(); - } - } - - public static byte[] CompressBuffer(byte[] b) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - Stream compressor = (Stream) new GZipStream((Stream) memoryStream, CompressionMode.Compress, CompressionLevel.BestCompression); - ZlibBaseStream.CompressBuffer(b, compressor); - return memoryStream.ToArray(); - } - } - - public static string UncompressString(byte[] compressed) - { - using (MemoryStream memoryStream = new MemoryStream(compressed)) - { - Stream decompressor = (Stream) new GZipStream((Stream) memoryStream, CompressionMode.Decompress); - return ZlibBaseStream.UncompressString(compressed, decompressor); - } - } - - public static byte[] UncompressBuffer(byte[] compressed) - { - using (MemoryStream memoryStream = new MemoryStream(compressed)) - { - Stream decompressor = (Stream) new GZipStream((Stream) memoryStream, CompressionMode.Decompress); - return ZlibBaseStream.UncompressBuffer(compressed, decompressor); - } - } - } -} diff --git a/Src/IonicZipFiles/Zlib/InfTree.cs b/Src/IonicZipFiles/Zlib/InfTree.cs deleted file mode 100644 index 1824d544..00000000 --- a/Src/IonicZipFiles/Zlib/InfTree.cs +++ /dev/null @@ -1,2075 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.InfTree -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zlib -{ - internal sealed class InfTree - { - private const int MANY = 1440; - private const int Z_OK = 0; - private const int Z_STREAM_END = 1; - private const int Z_NEED_DICT = 2; - private const int Z_ERRNO = -1; - private const int Z_STREAM_ERROR = -2; - private const int Z_DATA_ERROR = -3; - private const int Z_MEM_ERROR = -4; - private const int Z_BUF_ERROR = -5; - private const int Z_VERSION_ERROR = -6; - internal const int fixed_bl = 9; - internal const int fixed_bd = 5; - internal const int BMAX = 15; - internal static readonly int[] fixed_tl = new int[1536] - { - 96, - 7, - 256, - 0, - 8, - 80, - 0, - 8, - 16, - 84, - 8, - 115, - 82, - 7, - 31, - 0, - 8, - 112, - 0, - 8, - 48, - 0, - 9, - 192, - 80, - 7, - 10, - 0, - 8, - 96, - 0, - 8, - 32, - 0, - 9, - 160, - 0, - 8, - 0, - 0, - 8, - 128, - 0, - 8, - 64, - 0, - 9, - 224, - 80, - 7, - 6, - 0, - 8, - 88, - 0, - 8, - 24, - 0, - 9, - 144, - 83, - 7, - 59, - 0, - 8, - 120, - 0, - 8, - 56, - 0, - 9, - 208, - 81, - 7, - 17, - 0, - 8, - 104, - 0, - 8, - 40, - 0, - 9, - 176, - 0, - 8, - 8, - 0, - 8, - 136, - 0, - 8, - 72, - 0, - 9, - 240, - 80, - 7, - 4, - 0, - 8, - 84, - 0, - 8, - 20, - 85, - 8, - 227, - 83, - 7, - 43, - 0, - 8, - 116, - 0, - 8, - 52, - 0, - 9, - 200, - 81, - 7, - 13, - 0, - 8, - 100, - 0, - 8, - 36, - 0, - 9, - 168, - 0, - 8, - 4, - 0, - 8, - 132, - 0, - 8, - 68, - 0, - 9, - 232, - 80, - 7, - 8, - 0, - 8, - 92, - 0, - 8, - 28, - 0, - 9, - 152, - 84, - 7, - 83, - 0, - 8, - 124, - 0, - 8, - 60, - 0, - 9, - 216, - 82, - 7, - 23, - 0, - 8, - 108, - 0, - 8, - 44, - 0, - 9, - 184, - 0, - 8, - 12, - 0, - 8, - 140, - 0, - 8, - 76, - 0, - 9, - 248, - 80, - 7, - 3, - 0, - 8, - 82, - 0, - 8, - 18, - 85, - 8, - 163, - 83, - 7, - 35, - 0, - 8, - 114, - 0, - 8, - 50, - 0, - 9, - 196, - 81, - 7, - 11, - 0, - 8, - 98, - 0, - 8, - 34, - 0, - 9, - 164, - 0, - 8, - 2, - 0, - 8, - 130, - 0, - 8, - 66, - 0, - 9, - 228, - 80, - 7, - 7, - 0, - 8, - 90, - 0, - 8, - 26, - 0, - 9, - 148, - 84, - 7, - 67, - 0, - 8, - 122, - 0, - 8, - 58, - 0, - 9, - 212, - 82, - 7, - 19, - 0, - 8, - 106, - 0, - 8, - 42, - 0, - 9, - 180, - 0, - 8, - 10, - 0, - 8, - 138, - 0, - 8, - 74, - 0, - 9, - 244, - 80, - 7, - 5, - 0, - 8, - 86, - 0, - 8, - 22, - 192, - 8, - 0, - 83, - 7, - 51, - 0, - 8, - 118, - 0, - 8, - 54, - 0, - 9, - 204, - 81, - 7, - 15, - 0, - 8, - 102, - 0, - 8, - 38, - 0, - 9, - 172, - 0, - 8, - 6, - 0, - 8, - 134, - 0, - 8, - 70, - 0, - 9, - 236, - 80, - 7, - 9, - 0, - 8, - 94, - 0, - 8, - 30, - 0, - 9, - 156, - 84, - 7, - 99, - 0, - 8, - 126, - 0, - 8, - 62, - 0, - 9, - 220, - 82, - 7, - 27, - 0, - 8, - 110, - 0, - 8, - 46, - 0, - 9, - 188, - 0, - 8, - 14, - 0, - 8, - 142, - 0, - 8, - 78, - 0, - 9, - 252, - 96, - 7, - 256, - 0, - 8, - 81, - 0, - 8, - 17, - 85, - 8, - 131, - 82, - 7, - 31, - 0, - 8, - 113, - 0, - 8, - 49, - 0, - 9, - 194, - 80, - 7, - 10, - 0, - 8, - 97, - 0, - 8, - 33, - 0, - 9, - 162, - 0, - 8, - 1, - 0, - 8, - 129, - 0, - 8, - 65, - 0, - 9, - 226, - 80, - 7, - 6, - 0, - 8, - 89, - 0, - 8, - 25, - 0, - 9, - 146, - 83, - 7, - 59, - 0, - 8, - 121, - 0, - 8, - 57, - 0, - 9, - 210, - 81, - 7, - 17, - 0, - 8, - 105, - 0, - 8, - 41, - 0, - 9, - 178, - 0, - 8, - 9, - 0, - 8, - 137, - 0, - 8, - 73, - 0, - 9, - 242, - 80, - 7, - 4, - 0, - 8, - 85, - 0, - 8, - 21, - 80, - 8, - 258, - 83, - 7, - 43, - 0, - 8, - 117, - 0, - 8, - 53, - 0, - 9, - 202, - 81, - 7, - 13, - 0, - 8, - 101, - 0, - 8, - 37, - 0, - 9, - 170, - 0, - 8, - 5, - 0, - 8, - 133, - 0, - 8, - 69, - 0, - 9, - 234, - 80, - 7, - 8, - 0, - 8, - 93, - 0, - 8, - 29, - 0, - 9, - 154, - 84, - 7, - 83, - 0, - 8, - 125, - 0, - 8, - 61, - 0, - 9, - 218, - 82, - 7, - 23, - 0, - 8, - 109, - 0, - 8, - 45, - 0, - 9, - 186, - 0, - 8, - 13, - 0, - 8, - 141, - 0, - 8, - 77, - 0, - 9, - 250, - 80, - 7, - 3, - 0, - 8, - 83, - 0, - 8, - 19, - 85, - 8, - 195, - 83, - 7, - 35, - 0, - 8, - 115, - 0, - 8, - 51, - 0, - 9, - 198, - 81, - 7, - 11, - 0, - 8, - 99, - 0, - 8, - 35, - 0, - 9, - 166, - 0, - 8, - 3, - 0, - 8, - 131, - 0, - 8, - 67, - 0, - 9, - 230, - 80, - 7, - 7, - 0, - 8, - 91, - 0, - 8, - 27, - 0, - 9, - 150, - 84, - 7, - 67, - 0, - 8, - 123, - 0, - 8, - 59, - 0, - 9, - 214, - 82, - 7, - 19, - 0, - 8, - 107, - 0, - 8, - 43, - 0, - 9, - 182, - 0, - 8, - 11, - 0, - 8, - 139, - 0, - 8, - 75, - 0, - 9, - 246, - 80, - 7, - 5, - 0, - 8, - 87, - 0, - 8, - 23, - 192, - 8, - 0, - 83, - 7, - 51, - 0, - 8, - 119, - 0, - 8, - 55, - 0, - 9, - 206, - 81, - 7, - 15, - 0, - 8, - 103, - 0, - 8, - 39, - 0, - 9, - 174, - 0, - 8, - 7, - 0, - 8, - 135, - 0, - 8, - 71, - 0, - 9, - 238, - 80, - 7, - 9, - 0, - 8, - 95, - 0, - 8, - 31, - 0, - 9, - 158, - 84, - 7, - 99, - 0, - 8, - (int) sbyte.MaxValue, - 0, - 8, - 63, - 0, - 9, - 222, - 82, - 7, - 27, - 0, - 8, - 111, - 0, - 8, - 47, - 0, - 9, - 190, - 0, - 8, - 15, - 0, - 8, - 143, - 0, - 8, - 79, - 0, - 9, - 254, - 96, - 7, - 256, - 0, - 8, - 80, - 0, - 8, - 16, - 84, - 8, - 115, - 82, - 7, - 31, - 0, - 8, - 112, - 0, - 8, - 48, - 0, - 9, - 193, - 80, - 7, - 10, - 0, - 8, - 96, - 0, - 8, - 32, - 0, - 9, - 161, - 0, - 8, - 0, - 0, - 8, - 128, - 0, - 8, - 64, - 0, - 9, - 225, - 80, - 7, - 6, - 0, - 8, - 88, - 0, - 8, - 24, - 0, - 9, - 145, - 83, - 7, - 59, - 0, - 8, - 120, - 0, - 8, - 56, - 0, - 9, - 209, - 81, - 7, - 17, - 0, - 8, - 104, - 0, - 8, - 40, - 0, - 9, - 177, - 0, - 8, - 8, - 0, - 8, - 136, - 0, - 8, - 72, - 0, - 9, - 241, - 80, - 7, - 4, - 0, - 8, - 84, - 0, - 8, - 20, - 85, - 8, - 227, - 83, - 7, - 43, - 0, - 8, - 116, - 0, - 8, - 52, - 0, - 9, - 201, - 81, - 7, - 13, - 0, - 8, - 100, - 0, - 8, - 36, - 0, - 9, - 169, - 0, - 8, - 4, - 0, - 8, - 132, - 0, - 8, - 68, - 0, - 9, - 233, - 80, - 7, - 8, - 0, - 8, - 92, - 0, - 8, - 28, - 0, - 9, - 153, - 84, - 7, - 83, - 0, - 8, - 124, - 0, - 8, - 60, - 0, - 9, - 217, - 82, - 7, - 23, - 0, - 8, - 108, - 0, - 8, - 44, - 0, - 9, - 185, - 0, - 8, - 12, - 0, - 8, - 140, - 0, - 8, - 76, - 0, - 9, - 249, - 80, - 7, - 3, - 0, - 8, - 82, - 0, - 8, - 18, - 85, - 8, - 163, - 83, - 7, - 35, - 0, - 8, - 114, - 0, - 8, - 50, - 0, - 9, - 197, - 81, - 7, - 11, - 0, - 8, - 98, - 0, - 8, - 34, - 0, - 9, - 165, - 0, - 8, - 2, - 0, - 8, - 130, - 0, - 8, - 66, - 0, - 9, - 229, - 80, - 7, - 7, - 0, - 8, - 90, - 0, - 8, - 26, - 0, - 9, - 149, - 84, - 7, - 67, - 0, - 8, - 122, - 0, - 8, - 58, - 0, - 9, - 213, - 82, - 7, - 19, - 0, - 8, - 106, - 0, - 8, - 42, - 0, - 9, - 181, - 0, - 8, - 10, - 0, - 8, - 138, - 0, - 8, - 74, - 0, - 9, - 245, - 80, - 7, - 5, - 0, - 8, - 86, - 0, - 8, - 22, - 192, - 8, - 0, - 83, - 7, - 51, - 0, - 8, - 118, - 0, - 8, - 54, - 0, - 9, - 205, - 81, - 7, - 15, - 0, - 8, - 102, - 0, - 8, - 38, - 0, - 9, - 173, - 0, - 8, - 6, - 0, - 8, - 134, - 0, - 8, - 70, - 0, - 9, - 237, - 80, - 7, - 9, - 0, - 8, - 94, - 0, - 8, - 30, - 0, - 9, - 157, - 84, - 7, - 99, - 0, - 8, - 126, - 0, - 8, - 62, - 0, - 9, - 221, - 82, - 7, - 27, - 0, - 8, - 110, - 0, - 8, - 46, - 0, - 9, - 189, - 0, - 8, - 14, - 0, - 8, - 142, - 0, - 8, - 78, - 0, - 9, - 253, - 96, - 7, - 256, - 0, - 8, - 81, - 0, - 8, - 17, - 85, - 8, - 131, - 82, - 7, - 31, - 0, - 8, - 113, - 0, - 8, - 49, - 0, - 9, - 195, - 80, - 7, - 10, - 0, - 8, - 97, - 0, - 8, - 33, - 0, - 9, - 163, - 0, - 8, - 1, - 0, - 8, - 129, - 0, - 8, - 65, - 0, - 9, - 227, - 80, - 7, - 6, - 0, - 8, - 89, - 0, - 8, - 25, - 0, - 9, - 147, - 83, - 7, - 59, - 0, - 8, - 121, - 0, - 8, - 57, - 0, - 9, - 211, - 81, - 7, - 17, - 0, - 8, - 105, - 0, - 8, - 41, - 0, - 9, - 179, - 0, - 8, - 9, - 0, - 8, - 137, - 0, - 8, - 73, - 0, - 9, - 243, - 80, - 7, - 4, - 0, - 8, - 85, - 0, - 8, - 21, - 80, - 8, - 258, - 83, - 7, - 43, - 0, - 8, - 117, - 0, - 8, - 53, - 0, - 9, - 203, - 81, - 7, - 13, - 0, - 8, - 101, - 0, - 8, - 37, - 0, - 9, - 171, - 0, - 8, - 5, - 0, - 8, - 133, - 0, - 8, - 69, - 0, - 9, - 235, - 80, - 7, - 8, - 0, - 8, - 93, - 0, - 8, - 29, - 0, - 9, - 155, - 84, - 7, - 83, - 0, - 8, - 125, - 0, - 8, - 61, - 0, - 9, - 219, - 82, - 7, - 23, - 0, - 8, - 109, - 0, - 8, - 45, - 0, - 9, - 187, - 0, - 8, - 13, - 0, - 8, - 141, - 0, - 8, - 77, - 0, - 9, - 251, - 80, - 7, - 3, - 0, - 8, - 83, - 0, - 8, - 19, - 85, - 8, - 195, - 83, - 7, - 35, - 0, - 8, - 115, - 0, - 8, - 51, - 0, - 9, - 199, - 81, - 7, - 11, - 0, - 8, - 99, - 0, - 8, - 35, - 0, - 9, - 167, - 0, - 8, - 3, - 0, - 8, - 131, - 0, - 8, - 67, - 0, - 9, - 231, - 80, - 7, - 7, - 0, - 8, - 91, - 0, - 8, - 27, - 0, - 9, - 151, - 84, - 7, - 67, - 0, - 8, - 123, - 0, - 8, - 59, - 0, - 9, - 215, - 82, - 7, - 19, - 0, - 8, - 107, - 0, - 8, - 43, - 0, - 9, - 183, - 0, - 8, - 11, - 0, - 8, - 139, - 0, - 8, - 75, - 0, - 9, - 247, - 80, - 7, - 5, - 0, - 8, - 87, - 0, - 8, - 23, - 192, - 8, - 0, - 83, - 7, - 51, - 0, - 8, - 119, - 0, - 8, - 55, - 0, - 9, - 207, - 81, - 7, - 15, - 0, - 8, - 103, - 0, - 8, - 39, - 0, - 9, - 175, - 0, - 8, - 7, - 0, - 8, - 135, - 0, - 8, - 71, - 0, - 9, - 239, - 80, - 7, - 9, - 0, - 8, - 95, - 0, - 8, - 31, - 0, - 9, - 159, - 84, - 7, - 99, - 0, - 8, - (int) sbyte.MaxValue, - 0, - 8, - 63, - 0, - 9, - 223, - 82, - 7, - 27, - 0, - 8, - 111, - 0, - 8, - 47, - 0, - 9, - 191, - 0, - 8, - 15, - 0, - 8, - 143, - 0, - 8, - 79, - 0, - 9, - (int) byte.MaxValue - }; - internal static readonly int[] fixed_td = new int[96] - { - 80, - 5, - 1, - 87, - 5, - 257, - 83, - 5, - 17, - 91, - 5, - 4097, - 81, - 5, - 5, - 89, - 5, - 1025, - 85, - 5, - 65, - 93, - 5, - 16385, - 80, - 5, - 3, - 88, - 5, - 513, - 84, - 5, - 33, - 92, - 5, - 8193, - 82, - 5, - 9, - 90, - 5, - 2049, - 86, - 5, - 129, - 192, - 5, - 24577, - 80, - 5, - 2, - 87, - 5, - 385, - 83, - 5, - 25, - 91, - 5, - 6145, - 81, - 5, - 7, - 89, - 5, - 1537, - 85, - 5, - 97, - 93, - 5, - 24577, - 80, - 5, - 4, - 88, - 5, - 769, - 84, - 5, - 49, - 92, - 5, - 12289, - 82, - 5, - 13, - 90, - 5, - 3073, - 86, - 5, - 193, - 192, - 5, - 24577 - }; - internal static readonly int[] cplens = new int[31] - { - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 13, - 15, - 17, - 19, - 23, - 27, - 31, - 35, - 43, - 51, - 59, - 67, - 83, - 99, - 115, - 131, - 163, - 195, - 227, - 258, - 0, - 0 - }; - internal static readonly int[] cplext = new int[31] - { - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 3, - 3, - 3, - 3, - 4, - 4, - 4, - 4, - 5, - 5, - 5, - 5, - 0, - 112, - 112 - }; - internal static readonly int[] cpdist = new int[30] - { - 1, - 2, - 3, - 4, - 5, - 7, - 9, - 13, - 17, - 25, - 33, - 49, - 65, - 97, - 129, - 193, - 257, - 385, - 513, - 769, - 1025, - 1537, - 2049, - 3073, - 4097, - 6145, - 8193, - 12289, - 16385, - 24577 - }; - internal static readonly int[] cpdext = new int[30] - { - 0, - 0, - 0, - 0, - 1, - 1, - 2, - 2, - 3, - 3, - 4, - 4, - 5, - 5, - 6, - 6, - 7, - 7, - 8, - 8, - 9, - 9, - 10, - 10, - 11, - 11, - 12, - 12, - 13, - 13 - }; - internal int[] hn; - internal int[] v; - internal int[] c; - internal int[] r; - internal int[] u; - internal int[] x; - - private int huft_build( - int[] b, - int bindex, - int n, - int s, - int[] d, - int[] e, - int[] t, - int[] m, - int[] hp, - int[] hn, - int[] v) - { - int num1 = 0; - int num2 = n; - do - { - ++this.c[b[bindex + num1]]; - ++num1; - --num2; - } - while (num2 != 0); - if (this.c[0] == n) - { - t[0] = -1; - m[0] = 0; - return 0; - } - int num3 = m[0]; - int index1 = 1; - while (index1 <= 15 && this.c[index1] == 0) - ++index1; - int index2 = index1; - if (num3 < index1) - num3 = index1; - int index3 = 15; - while (index3 != 0 && this.c[index3] == 0) - --index3; - int index4 = index3; - if (num3 > index3) - num3 = index3; - m[0] = num3; - int num4 = 1 << index1; - while (index1 < index3) - { - int num5; - if ((num5 = num4 - this.c[index1]) < 0) - return -3; - ++index1; - num4 = num5 << 1; - } - int num6; - if ((num6 = num4 - this.c[index3]) < 0) - return -3; - this.c[index3] += num6; - int num7; - this.x[1] = num7 = 0; - int index5 = 1; - int index6 = 2; - while (--index3 != 0) - { - this.x[index6] = (num7 += this.c[index5]); - ++index6; - ++index5; - } - int num8 = 0; - int num9 = 0; - do - { - int index7; - if ((index7 = b[bindex + num9]) != 0) - v[this.x[index7]++] = num8; - ++num9; - } - while (++num8 < n); - n = this.x[index4]; - int number1; - this.x[0] = number1 = 0; - int index8 = 0; - int index9 = -1; - int bits = -num3; - this.u[0] = 0; - int num10 = 0; - int num11 = 0; - for (; index2 <= index4; ++index2) - { - int num12 = this.c[index2]; - while (num12-- != 0) - { - while (index2 > bits + num3) - { - ++index9; - bits += num3; - int num13 = index4 - bits; - int num14 = num13 > num3 ? num3 : num13; - int num15; - int num16; - if ((num16 = 1 << (num15 = index2 - bits)) > num12 + 1) - { - int num17 = num16 - (num12 + 1); - int index10 = index2; - if (num15 < num14) - { - int num18; - while (++num15 < num14 && (num18 = num17 << 1) > this.c[++index10]) - num17 = num18 - this.c[index10]; - } - } - num11 = 1 << num15; - if (hn[0] + num11 > 1440) - return -3; - this.u[index9] = num10 = hn[0]; - hn[0] += num11; - if (index9 != 0) - { - this.x[index9] = number1; - this.r[0] = (int) (sbyte) num15; - this.r[1] = (int) (sbyte) num3; - int num19 = SharedUtils.URShift(number1, bits - num3); - this.r[2] = num10 - this.u[index9 - 1] - num19; - Array.Copy((Array) this.r, 0, (Array) hp, (this.u[index9 - 1] + num19) * 3, 3); - } - else - t[0] = num10; - } - this.r[1] = (int) (sbyte) (index2 - bits); - if (index8 >= n) - this.r[0] = 192; - else if (v[index8] < s) - { - this.r[0] = v[index8] < 256 ? 0 : 96; - this.r[2] = v[index8++]; - } - else - { - this.r[0] = (int) (sbyte) (e[v[index8] - s] + 16 + 64); - this.r[2] = d[v[index8++] - s]; - } - int num20 = 1 << index2 - bits; - for (int index11 = SharedUtils.URShift(number1, bits); index11 < num11; index11 += num20) - Array.Copy((Array) this.r, 0, (Array) hp, (num10 + index11) * 3, 3); - int number2; - for (number2 = 1 << index2 - 1; (number1 & number2) != 0; number2 = SharedUtils.URShift(number2, 1)) - number1 ^= number2; - number1 ^= number2; - for (int index12 = (1 << bits) - 1; (number1 & index12) != this.x[index9]; index12 = (1 << bits) - 1) - { - --index9; - bits -= num3; - } - } - } - return num6 == 0 || index4 == 1 ? 0 : -5; - } - - internal int inflate_trees_bits(int[] c, int[] bb, int[] tb, int[] hp, ZlibCodec z) - { - this.initWorkArea(19); - this.hn[0] = 0; - int num = this.huft_build(c, 0, 19, 19, (int[]) null, (int[]) null, tb, bb, hp, this.hn, this.v); - switch (num) - { - case -5: - z.Message = "incomplete dynamic bit lengths tree"; - num = -3; - break; - case -3: - z.Message = "oversubscribed dynamic bit lengths tree"; - break; - default: - if (bb[0] != 0) - break; - goto case -5; - } - return num; - } - - internal int inflate_trees_dynamic( - int nl, - int nd, - int[] c, - int[] bl, - int[] bd, - int[] tl, - int[] td, - int[] hp, - ZlibCodec z) - { - this.initWorkArea(288); - this.hn[0] = 0; - int num1 = this.huft_build(c, 0, nl, 257, InfTree.cplens, InfTree.cplext, tl, bl, hp, this.hn, this.v); - if (num1 != 0 || bl[0] == 0) - { - switch (num1) - { - case -4: - return num1; - case -3: - z.Message = "oversubscribed literal/length tree"; - goto case -4; - default: - z.Message = "incomplete literal/length tree"; - num1 = -3; - goto case -4; - } - } - else - { - this.initWorkArea(288); - int num2 = this.huft_build(c, nl, nd, 0, InfTree.cpdist, InfTree.cpdext, td, bd, hp, this.hn, this.v); - if (num2 == 0 && (bd[0] != 0 || nl <= 257)) - return 0; - switch (num2) - { - case -5: - z.Message = "incomplete distance tree"; - num2 = -3; - goto case -4; - case -4: - return num2; - case -3: - z.Message = "oversubscribed distance tree"; - goto case -4; - default: - z.Message = "empty distance tree with lengths"; - num2 = -3; - goto case -4; - } - } - } - - internal static int inflate_trees_fixed( - int[] bl, - int[] bd, - int[][] tl, - int[][] td, - ZlibCodec z) - { - bl[0] = 9; - bd[0] = 5; - tl[0] = InfTree.fixed_tl; - td[0] = InfTree.fixed_td; - return 0; - } - - private void initWorkArea(int vsize) - { - if (this.hn == null) - { - this.hn = new int[1]; - this.v = new int[vsize]; - this.c = new int[16]; - this.r = new int[3]; - this.u = new int[15]; - this.x = new int[16]; - } - else - { - if (this.v.Length < vsize) - this.v = new int[vsize]; - Array.Clear((Array) this.v, 0, vsize); - Array.Clear((Array) this.c, 0, 16); - this.r[0] = 0; - this.r[1] = 0; - this.r[2] = 0; - Array.Clear((Array) this.u, 0, 15); - Array.Clear((Array) this.x, 0, 16); - } - } - } -} diff --git a/Src/IonicZipFiles/Zlib/InflateBlocks.cs b/Src/IonicZipFiles/Zlib/InflateBlocks.cs deleted file mode 100644 index cf1fb6fc..00000000 --- a/Src/IonicZipFiles/Zlib/InflateBlocks.cs +++ /dev/null @@ -1,629 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.InflateBlocks -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zlib -{ - internal sealed class InflateBlocks - { - private const int MANY = 1440; - internal static readonly int[] border = new int[19] - { - 16, - 17, - 18, - 0, - 8, - 7, - 9, - 6, - 10, - 5, - 11, - 4, - 12, - 3, - 13, - 2, - 14, - 1, - 15 - }; - private InflateBlocks.InflateBlockMode mode; - internal int left; - internal int table; - internal int index; - internal int[] blens; - internal int[] bb = new int[1]; - internal int[] tb = new int[1]; - internal InflateCodes codes = new InflateCodes(); - internal int last; - internal ZlibCodec _codec; - internal int bitk; - internal int bitb; - internal int[] hufts; - internal byte[] window; - internal int end; - internal int readAt; - internal int writeAt; - internal object checkfn; - internal uint check; - internal InfTree inftree = new InfTree(); - - internal InflateBlocks(ZlibCodec codec, object checkfn, int w) - { - this._codec = codec; - this.hufts = new int[4320]; - this.window = new byte[w]; - this.end = w; - this.checkfn = checkfn; - this.mode = InflateBlocks.InflateBlockMode.TYPE; - int num = (int) this.Reset(); - } - - internal uint Reset() - { - uint check = this.check; - this.mode = InflateBlocks.InflateBlockMode.TYPE; - this.bitk = 0; - this.bitb = 0; - this.readAt = this.writeAt = 0; - if (this.checkfn != null) - this._codec._Adler32 = this.check = Adler.Adler32(0U, (byte[]) null, 0, 0); - return check; - } - - internal int Process(int r) - { - int nextIn = this._codec.NextIn; - int availableBytesIn = this._codec.AvailableBytesIn; - int num1 = this.bitb; - int num2 = this.bitk; - int destinationIndex = this.writeAt; - int num3 = destinationIndex < this.readAt ? this.readAt - destinationIndex - 1 : this.end - destinationIndex; - int num4; - int num5; - while (true) - { - int length1; - do - { - switch (this.mode) - { - case InflateBlocks.InflateBlockMode.TYPE: - for (; num2 < 3; num2 += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - num1 |= ((int) this._codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - else - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - int num6 = num1 & 7; - this.last = num6 & 1; - switch (num6 >>> 1) - { - case 0: - int num7 = num1 >> 3; - int num8 = num2 - 3; - int num9 = num8 & 7; - num1 = num7 >> num9; - num2 = num8 - num9; - this.mode = InflateBlocks.InflateBlockMode.LENS; - continue; - case 1: - int[] bl1 = new int[1]; - int[] bd1 = new int[1]; - int[][] tl1 = new int[1][]; - int[][] td1 = new int[1][]; - InfTree.inflate_trees_fixed(bl1, bd1, tl1, td1, this._codec); - this.codes.Init(bl1[0], bd1[0], tl1[0], 0, td1[0], 0); - num1 >>= 3; - num2 -= 3; - this.mode = InflateBlocks.InflateBlockMode.CODES; - continue; - case 2: - num1 >>= 3; - num2 -= 3; - this.mode = InflateBlocks.InflateBlockMode.TABLE; - continue; - case 3: - int num10 = num1 >> 3; - int num11 = num2 - 3; - this.mode = InflateBlocks.InflateBlockMode.BAD; - this._codec.Message = "invalid block type"; - r = -3; - this.bitb = num10; - this.bitk = num11; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - default: - continue; - } - case InflateBlocks.InflateBlockMode.LENS: - for (; num2 < 32; num2 += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - num1 |= ((int) this._codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - else - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - if ((~num1 >> 16 & (int) ushort.MaxValue) != (num1 & (int) ushort.MaxValue)) - { - this.mode = InflateBlocks.InflateBlockMode.BAD; - this._codec.Message = "invalid stored block lengths"; - r = -3; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - this.left = num1 & (int) ushort.MaxValue; - num1 = num2 = 0; - this.mode = this.left != 0 ? InflateBlocks.InflateBlockMode.STORED : (this.last != 0 ? InflateBlocks.InflateBlockMode.DRY : InflateBlocks.InflateBlockMode.TYPE); - continue; - case InflateBlocks.InflateBlockMode.STORED: - if (availableBytesIn == 0) - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - if (num3 == 0) - { - if (destinationIndex == this.end && this.readAt != 0) - { - destinationIndex = 0; - num3 = destinationIndex < this.readAt ? this.readAt - destinationIndex - 1 : this.end - destinationIndex; - } - if (num3 == 0) - { - this.writeAt = destinationIndex; - r = this.Flush(r); - destinationIndex = this.writeAt; - num3 = destinationIndex < this.readAt ? this.readAt - destinationIndex - 1 : this.end - destinationIndex; - if (destinationIndex == this.end && this.readAt != 0) - { - destinationIndex = 0; - num3 = destinationIndex < this.readAt ? this.readAt - destinationIndex - 1 : this.end - destinationIndex; - } - if (num3 == 0) - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - } - r = 0; - length1 = this.left; - if (length1 > availableBytesIn) - length1 = availableBytesIn; - if (length1 > num3) - length1 = num3; - Array.Copy((Array) this._codec.InputBuffer, nextIn, (Array) this.window, destinationIndex, length1); - nextIn += length1; - availableBytesIn -= length1; - destinationIndex += length1; - num3 -= length1; - continue; - case InflateBlocks.InflateBlockMode.TABLE: - goto label_37; - case InflateBlocks.InflateBlockMode.BTREE: - goto label_49; - case InflateBlocks.InflateBlockMode.DTREE: - goto label_57; - case InflateBlocks.InflateBlockMode.CODES: - goto label_79; - case InflateBlocks.InflateBlockMode.DRY: - goto label_84; - case InflateBlocks.InflateBlockMode.DONE: - goto label_87; - case InflateBlocks.InflateBlockMode.BAD: - goto label_88; - default: - goto label_89; - } - } - while ((this.left -= length1) != 0); - this.mode = this.last != 0 ? InflateBlocks.InflateBlockMode.DRY : InflateBlocks.InflateBlockMode.TYPE; - continue; -label_37: - for (; num2 < 14; num2 += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - num1 |= ((int) this._codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - else - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - int num12; - this.table = num12 = num1 & 16383; - if ((num12 & 31) <= 29 && (num12 >> 5 & 31) <= 29) - { - int length2 = 258 + (num12 & 31) + (num12 >> 5 & 31); - if (this.blens == null || this.blens.Length < length2) - this.blens = new int[length2]; - else - Array.Clear((Array) this.blens, 0, length2); - num1 >>= 14; - num2 -= 14; - this.index = 0; - this.mode = InflateBlocks.InflateBlockMode.BTREE; - } - else - break; -label_49: - while (this.index < 4 + (this.table >> 10)) - { - for (; num2 < 3; num2 += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - num1 |= ((int) this._codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - else - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - this.blens[InflateBlocks.border[this.index++]] = num1 & 7; - num1 >>= 3; - num2 -= 3; - } - while (this.index < 19) - this.blens[InflateBlocks.border[this.index++]] = 0; - this.bb[0] = 7; - num4 = this.inftree.inflate_trees_bits(this.blens, this.bb, this.tb, this.hufts, this._codec); - if (num4 == 0) - { - this.index = 0; - this.mode = InflateBlocks.InflateBlockMode.DTREE; - } - else - goto label_53; -label_57: - while (true) - { - int table1 = this.table; - if (this.index < 258 + (table1 & 31) + (table1 >> 5 & 31)) - { - int index1; - for (index1 = this.bb[0]; num2 < index1; num2 += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - num1 |= ((int) this._codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - else - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - int huft1 = this.hufts[(this.tb[0] + (num1 & InternalInflateConstants.InflateMask[index1])) * 3 + 1]; - int huft2 = this.hufts[(this.tb[0] + (num1 & InternalInflateConstants.InflateMask[huft1])) * 3 + 2]; - if (huft2 < 16) - { - num1 >>= huft1; - num2 -= huft1; - this.blens[this.index++] = huft2; - } - else - { - int index2 = huft2 == 18 ? 7 : huft2 - 14; - int num13 = huft2 == 18 ? 11 : 3; - for (; num2 < huft1 + index2; num2 += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - num1 |= ((int) this._codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - else - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - } - int num14 = num1 >> huft1; - int num15 = num2 - huft1; - int num16 = num13 + (num14 & InternalInflateConstants.InflateMask[index2]); - num1 = num14 >> index2; - num2 = num15 - index2; - int index3 = this.index; - int table2 = this.table; - if (index3 + num16 <= 258 + (table2 & 31) + (table2 >> 5 & 31) && (huft2 != 16 || index3 >= 1)) - { - int blen = huft2 == 16 ? this.blens[index3 - 1] : 0; - do - { - this.blens[index3++] = blen; - } - while (--num16 != 0); - this.index = index3; - } - else - goto label_71; - } - } - else - break; - } - this.tb[0] = -1; - int[] bl2 = new int[1]{ 9 }; - int[] bd2 = new int[1]{ 6 }; - int[] tl2 = new int[1]; - int[] td2 = new int[1]; - int table = this.table; - num5 = this.inftree.inflate_trees_dynamic(257 + (table & 31), 1 + (table >> 5 & 31), this.blens, bl2, bd2, tl2, td2, this.hufts, this._codec); - switch (num5) - { - case -3: - goto label_76; - case 0: - this.codes.Init(bl2[0], bd2[0], this.hufts, tl2[0], this.hufts, td2[0]); - this.mode = InflateBlocks.InflateBlockMode.CODES; - break; - default: - goto label_77; - } -label_79: - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - r = this.codes.Process(this, r); - if (r == 1) - { - r = 0; - nextIn = this._codec.NextIn; - availableBytesIn = this._codec.AvailableBytesIn; - num1 = this.bitb; - num2 = this.bitk; - destinationIndex = this.writeAt; - num3 = destinationIndex < this.readAt ? this.readAt - destinationIndex - 1 : this.end - destinationIndex; - if (this.last == 0) - this.mode = InflateBlocks.InflateBlockMode.TYPE; - else - goto label_83; - } - else - goto label_80; - } - this.mode = InflateBlocks.InflateBlockMode.BAD; - this._codec.Message = "too many length or distance symbols"; - r = -3; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); -label_53: - r = num4; - if (r == -3) - { - this.blens = (int[]) null; - this.mode = InflateBlocks.InflateBlockMode.BAD; - } - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); -label_71: - this.blens = (int[]) null; - this.mode = InflateBlocks.InflateBlockMode.BAD; - this._codec.Message = "invalid bit length repeat"; - r = -3; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); -label_76: - this.blens = (int[]) null; - this.mode = InflateBlocks.InflateBlockMode.BAD; -label_77: - r = num5; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); -label_80: - return this.Flush(r); -label_83: - this.mode = InflateBlocks.InflateBlockMode.DRY; -label_84: - this.writeAt = destinationIndex; - r = this.Flush(r); - destinationIndex = this.writeAt; - int num17 = destinationIndex < this.readAt ? this.readAt - destinationIndex - 1 : this.end - destinationIndex; - if (this.readAt != this.writeAt) - { - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - this.mode = InflateBlocks.InflateBlockMode.DONE; -label_87: - r = 1; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); -label_88: - r = -3; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); -label_89: - r = -2; - this.bitb = num1; - this.bitk = num2; - this._codec.AvailableBytesIn = availableBytesIn; - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this.writeAt = destinationIndex; - return this.Flush(r); - } - - internal void Free() - { - int num = (int) this.Reset(); - this.window = (byte[]) null; - this.hufts = (int[]) null; - } - - internal void SetDictionary(byte[] d, int start, int n) - { - Array.Copy((Array) d, start, (Array) this.window, 0, n); - this.readAt = this.writeAt = n; - } - - internal int SyncPoint() => this.mode != InflateBlocks.InflateBlockMode.LENS ? 0 : 1; - - internal int Flush(int r) - { - for (int index = 0; index < 2; ++index) - { - int num = index != 0 ? this.writeAt - this.readAt : (this.readAt <= this.writeAt ? this.writeAt : this.end) - this.readAt; - if (num == 0) - { - if (r == -5) - r = 0; - return r; - } - if (num > this._codec.AvailableBytesOut) - num = this._codec.AvailableBytesOut; - if (num != 0 && r == -5) - r = 0; - this._codec.AvailableBytesOut -= num; - this._codec.TotalBytesOut += (long) num; - if (this.checkfn != null) - this._codec._Adler32 = this.check = Adler.Adler32(this.check, this.window, this.readAt, num); - Array.Copy((Array) this.window, this.readAt, (Array) this._codec.OutputBuffer, this._codec.NextOut, num); - this._codec.NextOut += num; - this.readAt += num; - if (this.readAt == this.end && index == 0) - { - this.readAt = 0; - if (this.writeAt == this.end) - this.writeAt = 0; - } - else - ++index; - } - return r; - } - - private enum InflateBlockMode - { - TYPE, - LENS, - STORED, - TABLE, - BTREE, - DTREE, - CODES, - DRY, - DONE, - BAD, - } - } -} diff --git a/Src/IonicZipFiles/Zlib/InflateCodes.cs b/Src/IonicZipFiles/Zlib/InflateCodes.cs deleted file mode 100644 index 37d23805..00000000 --- a/Src/IonicZipFiles/Zlib/InflateCodes.cs +++ /dev/null @@ -1,651 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.InflateCodes -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zlib -{ - internal sealed class InflateCodes - { - private const int START = 0; - private const int LEN = 1; - private const int LENEXT = 2; - private const int DIST = 3; - private const int DISTEXT = 4; - private const int COPY = 5; - private const int LIT = 6; - private const int WASH = 7; - private const int END = 8; - private const int BADCODE = 9; - internal int mode; - internal int len; - internal int[] tree; - internal int tree_index; - internal int need; - internal int lit; - internal int bitsToGet; - internal int dist; - internal byte lbits; - internal byte dbits; - internal int[] ltree; - internal int ltree_index; - internal int[] dtree; - internal int dtree_index; - - internal InflateCodes() - { - } - - internal void Init(int bl, int bd, int[] tl, int tl_index, int[] td, int td_index) - { - this.mode = 0; - this.lbits = (byte) bl; - this.dbits = (byte) bd; - this.ltree = tl; - this.ltree_index = tl_index; - this.dtree = td; - this.dtree_index = td_index; - this.tree = (int[]) null; - } - - internal int Process(InflateBlocks blocks, int r) - { - ZlibCodec codec = blocks._codec; - int nextIn = codec.NextIn; - int availableBytesIn = codec.AvailableBytesIn; - int bitb = blocks.bitb; - int bitk = blocks.bitk; - int num1 = blocks.writeAt; - int num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - while (true) - { - switch (this.mode) - { - case 0: - if (num2 >= 258 && availableBytesIn >= 10) - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - r = this.InflateFast((int) this.lbits, (int) this.dbits, this.ltree, this.ltree_index, this.dtree, this.dtree_index, blocks, codec); - nextIn = codec.NextIn; - availableBytesIn = codec.AvailableBytesIn; - bitb = blocks.bitb; - bitk = blocks.bitk; - num1 = blocks.writeAt; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - int num3; - switch (r) - { - case 0: - goto label_7; - case 1: - num3 = 7; - break; - default: - num3 = 9; - break; - } - this.mode = num3; - continue; - } -label_7: - this.need = (int) this.lbits; - this.tree = this.ltree; - this.tree_index = this.ltree_index; - this.mode = 1; - goto case 1; - case 1: - int need1; - for (need1 = this.need; bitk < need1; bitk += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - bitb |= ((int) codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << bitk; - } - else - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - } - int index1 = (this.tree_index + (bitb & InternalInflateConstants.InflateMask[need1])) * 3; - bitb >>= this.tree[index1 + 1]; - bitk -= this.tree[index1 + 1]; - int num4 = this.tree[index1]; - if (num4 == 0) - { - this.lit = this.tree[index1 + 2]; - this.mode = 6; - continue; - } - if ((num4 & 16) != 0) - { - this.bitsToGet = num4 & 15; - this.len = this.tree[index1 + 2]; - this.mode = 2; - continue; - } - if ((num4 & 64) == 0) - { - this.need = num4; - this.tree_index = index1 / 3 + this.tree[index1 + 2]; - continue; - } - if ((num4 & 32) != 0) - { - this.mode = 7; - continue; - } - goto label_21; - case 2: - int bitsToGet1; - for (bitsToGet1 = this.bitsToGet; bitk < bitsToGet1; bitk += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - bitb |= ((int) codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << bitk; - } - else - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - } - this.len += bitb & InternalInflateConstants.InflateMask[bitsToGet1]; - bitb >>= bitsToGet1; - bitk -= bitsToGet1; - this.need = (int) this.dbits; - this.tree = this.dtree; - this.tree_index = this.dtree_index; - this.mode = 3; - goto case 3; - case 3: - int need2; - for (need2 = this.need; bitk < need2; bitk += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - bitb |= ((int) codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << bitk; - } - else - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - } - int index2 = (this.tree_index + (bitb & InternalInflateConstants.InflateMask[need2])) * 3; - bitb >>= this.tree[index2 + 1]; - bitk -= this.tree[index2 + 1]; - int num5 = this.tree[index2]; - if ((num5 & 16) != 0) - { - this.bitsToGet = num5 & 15; - this.dist = this.tree[index2 + 2]; - this.mode = 4; - continue; - } - if ((num5 & 64) == 0) - { - this.need = num5; - this.tree_index = index2 / 3 + this.tree[index2 + 2]; - continue; - } - goto label_37; - case 4: - int bitsToGet2; - for (bitsToGet2 = this.bitsToGet; bitk < bitsToGet2; bitk += 8) - { - if (availableBytesIn != 0) - { - r = 0; - --availableBytesIn; - bitb |= ((int) codec.InputBuffer[nextIn++] & (int) byte.MaxValue) << bitk; - } - else - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - } - this.dist += bitb & InternalInflateConstants.InflateMask[bitsToGet2]; - bitb >>= bitsToGet2; - bitk -= bitsToGet2; - this.mode = 5; - goto case 5; - case 5: - int num6 = num1 - this.dist; - while (num6 < 0) - num6 += blocks.end; - for (; this.len != 0; --this.len) - { - if (num2 == 0) - { - if (num1 == blocks.end && blocks.readAt != 0) - { - num1 = 0; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - } - if (num2 == 0) - { - blocks.writeAt = num1; - r = blocks.Flush(r); - num1 = blocks.writeAt; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - if (num1 == blocks.end && blocks.readAt != 0) - { - num1 = 0; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - } - if (num2 == 0) - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - } - } - blocks.window[num1++] = blocks.window[num6++]; - --num2; - if (num6 == blocks.end) - num6 = 0; - } - this.mode = 0; - continue; - case 6: - if (num2 == 0) - { - if (num1 == blocks.end && blocks.readAt != 0) - { - num1 = 0; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - } - if (num2 == 0) - { - blocks.writeAt = num1; - r = blocks.Flush(r); - num1 = blocks.writeAt; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - if (num1 == blocks.end && blocks.readAt != 0) - { - num1 = 0; - num2 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - } - if (num2 == 0) - goto label_67; - } - } - r = 0; - blocks.window[num1++] = (byte) this.lit; - --num2; - this.mode = 0; - continue; - case 7: - goto label_69; - case 8: - goto label_74; - case 9: - goto label_75; - default: - goto label_76; - } - } -label_21: - this.mode = 9; - codec.Message = "invalid literal/length code"; - r = -3; - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); -label_37: - this.mode = 9; - codec.Message = "invalid distance code"; - r = -3; - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); -label_67: - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); -label_69: - if (bitk > 7) - { - bitk -= 8; - ++availableBytesIn; - --nextIn; - } - blocks.writeAt = num1; - r = blocks.Flush(r); - num1 = blocks.writeAt; - int num7 = num1 < blocks.readAt ? blocks.readAt - num1 - 1 : blocks.end - num1; - if (blocks.readAt != blocks.writeAt) - { - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - this.mode = 8; -label_74: - r = 1; - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); -label_75: - r = -3; - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); -label_76: - r = -2; - blocks.bitb = bitb; - blocks.bitk = bitk; - codec.AvailableBytesIn = availableBytesIn; - codec.TotalBytesIn += (long) (nextIn - codec.NextIn); - codec.NextIn = nextIn; - blocks.writeAt = num1; - return blocks.Flush(r); - } - - internal int InflateFast( - int bl, - int bd, - int[] tl, - int tl_index, - int[] td, - int td_index, - InflateBlocks s, - ZlibCodec z) - { - int nextIn = z.NextIn; - int availableBytesIn = z.AvailableBytesIn; - int num1 = s.bitb; - int num2 = s.bitk; - int destinationIndex = s.writeAt; - int num3 = destinationIndex < s.readAt ? s.readAt - destinationIndex - 1 : s.end - destinationIndex; - int num4 = InternalInflateConstants.InflateMask[bl]; - int num5 = InternalInflateConstants.InflateMask[bd]; - do - { - for (; num2 < 20; num2 += 8) - { - --availableBytesIn; - num1 |= ((int) z.InputBuffer[nextIn++] & (int) byte.MaxValue) << num2; - } - int num6 = num1 & num4; - int[] numArray1 = tl; - int num7 = tl_index; - int index1 = (num7 + num6) * 3; - int index2; - if ((index2 = numArray1[index1]) == 0) - { - num1 >>= numArray1[index1 + 1]; - num2 -= numArray1[index1 + 1]; - s.window[destinationIndex++] = (byte) numArray1[index1 + 2]; - --num3; - } - else - { - do - { - num1 >>= numArray1[index1 + 1]; - num2 -= numArray1[index1 + 1]; - if ((index2 & 16) != 0) - { - int index3 = index2 & 15; - int length1 = numArray1[index1 + 2] + (num1 & InternalInflateConstants.InflateMask[index3]); - int num8 = num1 >> index3; - int num9; - for (num9 = num2 - index3; num9 < 15; num9 += 8) - { - --availableBytesIn; - num8 |= ((int) z.InputBuffer[nextIn++] & (int) byte.MaxValue) << num9; - } - int num10 = num8 & num5; - int[] numArray2 = td; - int num11 = td_index; - int index4 = (num11 + num10) * 3; - int index5 = numArray2[index4]; - while (true) - { - num8 >>= numArray2[index4 + 1]; - num9 -= numArray2[index4 + 1]; - if ((index5 & 16) == 0) - { - if ((index5 & 64) == 0) - { - num10 = num10 + numArray2[index4 + 2] + (num8 & InternalInflateConstants.InflateMask[index5]); - index4 = (num11 + num10) * 3; - index5 = numArray2[index4]; - } - else - goto label_30; - } - else - break; - } - int index6; - for (index6 = index5 & 15; num9 < index6; num9 += 8) - { - --availableBytesIn; - num8 |= ((int) z.InputBuffer[nextIn++] & (int) byte.MaxValue) << num9; - } - int num12 = numArray2[index4 + 2] + (num8 & InternalInflateConstants.InflateMask[index6]); - num1 = num8 >> index6; - num2 = num9 - index6; - num3 -= length1; - int sourceIndex1; - int num13; - if (destinationIndex >= num12) - { - int sourceIndex2 = destinationIndex - num12; - if (destinationIndex - sourceIndex2 > 0 && 2 > destinationIndex - sourceIndex2) - { - byte[] window1 = s.window; - int index7 = destinationIndex; - int num14 = index7 + 1; - byte[] window2 = s.window; - int index8 = sourceIndex2; - int num15 = index8 + 1; - int num16 = (int) window2[index8]; - window1[index7] = (byte) num16; - byte[] window3 = s.window; - int index9 = num14; - destinationIndex = index9 + 1; - byte[] window4 = s.window; - int index10 = num15; - sourceIndex1 = index10 + 1; - int num17 = (int) window4[index10]; - window3[index9] = (byte) num17; - length1 -= 2; - } - else - { - Array.Copy((Array) s.window, sourceIndex2, (Array) s.window, destinationIndex, 2); - destinationIndex += 2; - sourceIndex1 = sourceIndex2 + 2; - length1 -= 2; - } - } - else - { - sourceIndex1 = destinationIndex - num12; - do - { - sourceIndex1 += s.end; - } - while (sourceIndex1 < 0); - int length2 = s.end - sourceIndex1; - if (length1 > length2) - { - length1 -= length2; - if (destinationIndex - sourceIndex1 > 0 && length2 > destinationIndex - sourceIndex1) - { - do - { - s.window[destinationIndex++] = s.window[sourceIndex1++]; - } - while (--length2 != 0); - } - else - { - Array.Copy((Array) s.window, sourceIndex1, (Array) s.window, destinationIndex, length2); - destinationIndex += length2; - num13 = sourceIndex1 + length2; - } - sourceIndex1 = 0; - } - } - if (destinationIndex - sourceIndex1 > 0 && length1 > destinationIndex - sourceIndex1) - { - do - { - s.window[destinationIndex++] = s.window[sourceIndex1++]; - } - while (--length1 != 0); - goto label_37; - } - else - { - Array.Copy((Array) s.window, sourceIndex1, (Array) s.window, destinationIndex, length1); - destinationIndex += length1; - num13 = sourceIndex1 + length1; - goto label_37; - } -label_30: - z.Message = "invalid distance code"; - int num18 = z.AvailableBytesIn - availableBytesIn; - int num19 = num9 >> 3 < num18 ? num9 >> 3 : num18; - int num20 = availableBytesIn + num19; - int num21 = nextIn - num19; - int num22 = num9 - (num19 << 3); - s.bitb = num8; - s.bitk = num22; - z.AvailableBytesIn = num20; - z.TotalBytesIn += (long) (num21 - z.NextIn); - z.NextIn = num21; - s.writeAt = destinationIndex; - return -3; - } - if ((index2 & 64) == 0) - { - num6 = num6 + numArray1[index1 + 2] + (num1 & InternalInflateConstants.InflateMask[index2]); - index1 = (num7 + num6) * 3; - } - else - goto label_34; - } - while ((index2 = numArray1[index1]) != 0); - num1 >>= numArray1[index1 + 1]; - num2 -= numArray1[index1 + 1]; - s.window[destinationIndex++] = (byte) numArray1[index1 + 2]; - --num3; - goto label_37; -label_34: - if ((index2 & 32) != 0) - { - int num23 = z.AvailableBytesIn - availableBytesIn; - int num24 = num2 >> 3 < num23 ? num2 >> 3 : num23; - int num25 = availableBytesIn + num24; - int num26 = nextIn - num24; - int num27 = num2 - (num24 << 3); - s.bitb = num1; - s.bitk = num27; - z.AvailableBytesIn = num25; - z.TotalBytesIn += (long) (num26 - z.NextIn); - z.NextIn = num26; - s.writeAt = destinationIndex; - return 1; - } - z.Message = "invalid literal/length code"; - int num28 = z.AvailableBytesIn - availableBytesIn; - int num29 = num2 >> 3 < num28 ? num2 >> 3 : num28; - int num30 = availableBytesIn + num29; - int num31 = nextIn - num29; - int num32 = num2 - (num29 << 3); - s.bitb = num1; - s.bitk = num32; - z.AvailableBytesIn = num30; - z.TotalBytesIn += (long) (num31 - z.NextIn); - z.NextIn = num31; - s.writeAt = destinationIndex; - return -3; - } -label_37:; - } - while (num3 >= 258 && availableBytesIn >= 10); - int num33 = z.AvailableBytesIn - availableBytesIn; - int num34 = num2 >> 3 < num33 ? num2 >> 3 : num33; - int num35 = availableBytesIn + num34; - int num36 = nextIn - num34; - int num37 = num2 - (num34 << 3); - s.bitb = num1; - s.bitk = num37; - z.AvailableBytesIn = num35; - z.TotalBytesIn += (long) (num36 - z.NextIn); - z.NextIn = num36; - s.writeAt = destinationIndex; - return 0; - } - } -} diff --git a/Src/IonicZipFiles/Zlib/InflateManager.cs b/Src/IonicZipFiles/Zlib/InflateManager.cs deleted file mode 100644 index 30d885a0..00000000 --- a/Src/IonicZipFiles/Zlib/InflateManager.cs +++ /dev/null @@ -1,368 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.InflateManager -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal sealed class InflateManager - { - private const int PRESET_DICT = 32; - private const int Z_DEFLATED = 8; - private InflateManager.InflateManagerMode mode; - internal ZlibCodec _codec; - internal int method; - internal uint computedCheck; - internal uint expectedCheck; - internal int marker; - private bool _handleRfc1950HeaderBytes = true; - internal int wbits; - internal InflateBlocks blocks; - private static readonly byte[] mark = new byte[4] - { - (byte) 0, - (byte) 0, - byte.MaxValue, - byte.MaxValue - }; - - internal bool HandleRfc1950HeaderBytes - { - get => this._handleRfc1950HeaderBytes; - set => this._handleRfc1950HeaderBytes = value; - } - - public InflateManager() - { - } - - public InflateManager(bool expectRfc1950HeaderBytes) => this._handleRfc1950HeaderBytes = expectRfc1950HeaderBytes; - - internal int Reset() - { - this._codec.TotalBytesIn = this._codec.TotalBytesOut = 0L; - this._codec.Message = (string) null; - this.mode = this.HandleRfc1950HeaderBytes ? InflateManager.InflateManagerMode.METHOD : InflateManager.InflateManagerMode.BLOCKS; - int num = (int) this.blocks.Reset(); - return 0; - } - - internal int End() - { - if (this.blocks != null) - this.blocks.Free(); - this.blocks = (InflateBlocks) null; - return 0; - } - - internal int Initialize(ZlibCodec codec, int w) - { - this._codec = codec; - this._codec.Message = (string) null; - this.blocks = (InflateBlocks) null; - if (w < 8 || w > 15) - { - this.End(); - throw new ZlibException("Bad window size."); - } - this.wbits = w; - this.blocks = new InflateBlocks(codec, this.HandleRfc1950HeaderBytes ? (object) this : (object) (InflateManager) null, 1 << w); - this.Reset(); - return 0; - } - - internal int Inflate(FlushType flush) - { - if (this._codec.InputBuffer == null) - throw new ZlibException("InputBuffer is null. "); - int num1 = 0; - int r = -5; - while (true) - { - switch (this.mode) - { - case InflateManager.InflateManagerMode.METHOD: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - if (((this.method = (int) this._codec.InputBuffer[this._codec.NextIn++]) & 15) != 8) - { - this.mode = InflateManager.InflateManagerMode.BAD; - this._codec.Message = string.Format("unknown compression method (0x{0:X2})", (object) this.method); - this.marker = 5; - continue; - } - if ((this.method >> 4) + 8 > this.wbits) - { - this.mode = InflateManager.InflateManagerMode.BAD; - this._codec.Message = string.Format("invalid window size ({0})", (object) ((this.method >> 4) + 8)); - this.marker = 5; - continue; - } - this.mode = InflateManager.InflateManagerMode.FLAG; - continue; - } - goto label_5; - case InflateManager.InflateManagerMode.FLAG: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - int num2 = (int) this._codec.InputBuffer[this._codec.NextIn++] & (int) byte.MaxValue; - if (((this.method << 8) + num2) % 31 != 0) - { - this.mode = InflateManager.InflateManagerMode.BAD; - this._codec.Message = "incorrect header check"; - this.marker = 5; - continue; - } - this.mode = (num2 & 32) == 0 ? InflateManager.InflateManagerMode.BLOCKS : InflateManager.InflateManagerMode.DICT4; - continue; - } - goto label_12; - case InflateManager.InflateManagerMode.DICT4: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck = (uint) ((ulong) ((int) this._codec.InputBuffer[this._codec.NextIn++] << 24) & 4278190080UL); - this.mode = InflateManager.InflateManagerMode.DICT3; - continue; - } - goto label_17; - case InflateManager.InflateManagerMode.DICT3: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck += (uint) ((int) this._codec.InputBuffer[this._codec.NextIn++] << 16 & 16711680); - this.mode = InflateManager.InflateManagerMode.DICT2; - continue; - } - goto label_20; - case InflateManager.InflateManagerMode.DICT2: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck += (uint) ((int) this._codec.InputBuffer[this._codec.NextIn++] << 8 & 65280); - this.mode = InflateManager.InflateManagerMode.DICT1; - continue; - } - goto label_23; - case InflateManager.InflateManagerMode.DICT1: - goto label_25; - case InflateManager.InflateManagerMode.DICT0: - goto label_28; - case InflateManager.InflateManagerMode.BLOCKS: - r = this.blocks.Process(r); - if (r == -3) - { - this.mode = InflateManager.InflateManagerMode.BAD; - this.marker = 0; - continue; - } - if (r == 0) - r = num1; - if (r == 1) - { - r = num1; - this.computedCheck = this.blocks.Reset(); - if (this.HandleRfc1950HeaderBytes) - { - this.mode = InflateManager.InflateManagerMode.CHECK4; - continue; - } - goto label_36; - } - else - goto label_34; - case InflateManager.InflateManagerMode.CHECK4: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck = (uint) ((ulong) ((int) this._codec.InputBuffer[this._codec.NextIn++] << 24) & 4278190080UL); - this.mode = InflateManager.InflateManagerMode.CHECK3; - continue; - } - goto label_39; - case InflateManager.InflateManagerMode.CHECK3: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck += (uint) ((int) this._codec.InputBuffer[this._codec.NextIn++] << 16 & 16711680); - this.mode = InflateManager.InflateManagerMode.CHECK2; - continue; - } - goto label_42; - case InflateManager.InflateManagerMode.CHECK2: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck += (uint) ((int) this._codec.InputBuffer[this._codec.NextIn++] << 8 & 65280); - this.mode = InflateManager.InflateManagerMode.CHECK1; - continue; - } - goto label_45; - case InflateManager.InflateManagerMode.CHECK1: - if (this._codec.AvailableBytesIn != 0) - { - r = num1; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck += (uint) this._codec.InputBuffer[this._codec.NextIn++] & (uint) byte.MaxValue; - if ((int) this.computedCheck != (int) this.expectedCheck) - { - this.mode = InflateManager.InflateManagerMode.BAD; - this._codec.Message = "incorrect data check"; - this.marker = 5; - continue; - } - goto label_51; - } - else - goto label_48; - case InflateManager.InflateManagerMode.DONE: - goto label_52; - case InflateManager.InflateManagerMode.BAD: - goto label_53; - default: - goto label_54; - } - } -label_5: - return r; -label_12: - return r; -label_17: - return r; -label_20: - return r; -label_23: - return r; -label_25: - if (this._codec.AvailableBytesIn == 0) - return r; - --this._codec.AvailableBytesIn; - ++this._codec.TotalBytesIn; - this.expectedCheck += (uint) this._codec.InputBuffer[this._codec.NextIn++] & (uint) byte.MaxValue; - this._codec._Adler32 = this.expectedCheck; - this.mode = InflateManager.InflateManagerMode.DICT0; - return 2; -label_28: - this.mode = InflateManager.InflateManagerMode.BAD; - this._codec.Message = "need dictionary"; - this.marker = 0; - return -2; -label_34: - return r; -label_36: - this.mode = InflateManager.InflateManagerMode.DONE; - return 1; -label_39: - return r; -label_42: - return r; -label_45: - return r; -label_48: - return r; -label_51: - this.mode = InflateManager.InflateManagerMode.DONE; - return 1; -label_52: - return 1; -label_53: - throw new ZlibException(string.Format("Bad state ({0})", (object) this._codec.Message)); -label_54: - throw new ZlibException("Stream error."); - } - - internal int SetDictionary(byte[] dictionary) - { - int start = 0; - int n = dictionary.Length; - if (this.mode != InflateManager.InflateManagerMode.DICT0) - throw new ZlibException("Stream error."); - if ((int) Adler.Adler32(1U, dictionary, 0, dictionary.Length) != (int) this._codec._Adler32) - return -3; - this._codec._Adler32 = Adler.Adler32(0U, (byte[]) null, 0, 0); - if (n >= 1 << this.wbits) - { - n = (1 << this.wbits) - 1; - start = dictionary.Length - n; - } - this.blocks.SetDictionary(dictionary, start, n); - this.mode = InflateManager.InflateManagerMode.BLOCKS; - return 0; - } - - internal int Sync() - { - if (this.mode != InflateManager.InflateManagerMode.BAD) - { - this.mode = InflateManager.InflateManagerMode.BAD; - this.marker = 0; - } - int availableBytesIn; - if ((availableBytesIn = this._codec.AvailableBytesIn) == 0) - return -5; - int nextIn = this._codec.NextIn; - int index; - for (index = this.marker; availableBytesIn != 0 && index < 4; --availableBytesIn) - { - if ((int) this._codec.InputBuffer[nextIn] == (int) InflateManager.mark[index]) - ++index; - else - index = this._codec.InputBuffer[nextIn] == (byte) 0 ? 4 - index : 0; - ++nextIn; - } - this._codec.TotalBytesIn += (long) (nextIn - this._codec.NextIn); - this._codec.NextIn = nextIn; - this._codec.AvailableBytesIn = availableBytesIn; - this.marker = index; - if (index != 4) - return -3; - long totalBytesIn = this._codec.TotalBytesIn; - long totalBytesOut = this._codec.TotalBytesOut; - this.Reset(); - this._codec.TotalBytesIn = totalBytesIn; - this._codec.TotalBytesOut = totalBytesOut; - this.mode = InflateManager.InflateManagerMode.BLOCKS; - return 0; - } - - internal int SyncPoint(ZlibCodec z) => this.blocks.SyncPoint(); - - private enum InflateManagerMode - { - METHOD, - FLAG, - DICT4, - DICT3, - DICT2, - DICT1, - DICT0, - BLOCKS, - CHECK4, - CHECK3, - CHECK2, - CHECK1, - DONE, - BAD, - } - } -} diff --git a/Src/IonicZipFiles/Zlib/InternalConstants.cs b/Src/IonicZipFiles/Zlib/InternalConstants.cs deleted file mode 100644 index 2e8c1bf5..00000000 --- a/Src/IonicZipFiles/Zlib/InternalConstants.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.InternalConstants -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal static class InternalConstants - { - internal static readonly int MAX_BITS = 15; - internal static readonly int BL_CODES = 19; - internal static readonly int D_CODES = 30; - internal static readonly int LITERALS = 256; - internal static readonly int LENGTH_CODES = 29; - internal static readonly int L_CODES = InternalConstants.LITERALS + 1 + InternalConstants.LENGTH_CODES; - internal static readonly int MAX_BL_BITS = 7; - internal static readonly int REP_3_6 = 16; - internal static readonly int REPZ_3_10 = 17; - internal static readonly int REPZ_11_138 = 18; - } -} diff --git a/Src/IonicZipFiles/Zlib/InternalInflateConstants.cs b/Src/IonicZipFiles/Zlib/InternalInflateConstants.cs deleted file mode 100644 index 0b255267..00000000 --- a/Src/IonicZipFiles/Zlib/InternalInflateConstants.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.InternalInflateConstants -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal static class InternalInflateConstants - { - internal static readonly int[] InflateMask = new int[17] - { - 0, - 1, - 3, - 7, - 15, - 31, - 63, - (int) sbyte.MaxValue, - (int) byte.MaxValue, - 511, - 1023, - 2047, - 4095, - 8191, - 16383, - (int) short.MaxValue, - (int) ushort.MaxValue - }; - } -} diff --git a/Src/IonicZipFiles/Zlib/SharedUtils.cs b/Src/IonicZipFiles/Zlib/SharedUtils.cs deleted file mode 100644 index 2f67a1a8..00000000 --- a/Src/IonicZipFiles/Zlib/SharedUtils.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.SharedUtils -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.IO; -using System.Text; - -namespace Ionic.Zlib -{ - internal class SharedUtils - { - public static int URShift(int number, int bits) => number >>> bits; - - public static int ReadInput(TextReader sourceTextReader, byte[] target, int start, int count) - { - if (target.Length == 0) - return 0; - char[] buffer = new char[target.Length]; - int num = sourceTextReader.Read(buffer, start, count); - if (num == 0) - return -1; - for (int index = start; index < start + num; ++index) - target[index] = (byte) buffer[index]; - return num; - } - - internal static byte[] ToByteArray(string sourceString) => Encoding.UTF8.GetBytes(sourceString); - - internal static char[] ToCharArray(byte[] byteArray) => Encoding.UTF8.GetChars(byteArray); - } -} diff --git a/Src/IonicZipFiles/Zlib/StaticTree.cs b/Src/IonicZipFiles/Zlib/StaticTree.cs deleted file mode 100644 index 899d0675..00000000 --- a/Src/IonicZipFiles/Zlib/StaticTree.cs +++ /dev/null @@ -1,676 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.StaticTree -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal sealed class StaticTree - { - internal static readonly short[] lengthAndLiteralsTreeCodes = new short[576] - { - (short) 12, - (short) 8, - (short) 140, - (short) 8, - (short) 76, - (short) 8, - (short) 204, - (short) 8, - (short) 44, - (short) 8, - (short) 172, - (short) 8, - (short) 108, - (short) 8, - (short) 236, - (short) 8, - (short) 28, - (short) 8, - (short) 156, - (short) 8, - (short) 92, - (short) 8, - (short) 220, - (short) 8, - (short) 60, - (short) 8, - (short) 188, - (short) 8, - (short) 124, - (short) 8, - (short) 252, - (short) 8, - (short) 2, - (short) 8, - (short) 130, - (short) 8, - (short) 66, - (short) 8, - (short) 194, - (short) 8, - (short) 34, - (short) 8, - (short) 162, - (short) 8, - (short) 98, - (short) 8, - (short) 226, - (short) 8, - (short) 18, - (short) 8, - (short) 146, - (short) 8, - (short) 82, - (short) 8, - (short) 210, - (short) 8, - (short) 50, - (short) 8, - (short) 178, - (short) 8, - (short) 114, - (short) 8, - (short) 242, - (short) 8, - (short) 10, - (short) 8, - (short) 138, - (short) 8, - (short) 74, - (short) 8, - (short) 202, - (short) 8, - (short) 42, - (short) 8, - (short) 170, - (short) 8, - (short) 106, - (short) 8, - (short) 234, - (short) 8, - (short) 26, - (short) 8, - (short) 154, - (short) 8, - (short) 90, - (short) 8, - (short) 218, - (short) 8, - (short) 58, - (short) 8, - (short) 186, - (short) 8, - (short) 122, - (short) 8, - (short) 250, - (short) 8, - (short) 6, - (short) 8, - (short) 134, - (short) 8, - (short) 70, - (short) 8, - (short) 198, - (short) 8, - (short) 38, - (short) 8, - (short) 166, - (short) 8, - (short) 102, - (short) 8, - (short) 230, - (short) 8, - (short) 22, - (short) 8, - (short) 150, - (short) 8, - (short) 86, - (short) 8, - (short) 214, - (short) 8, - (short) 54, - (short) 8, - (short) 182, - (short) 8, - (short) 118, - (short) 8, - (short) 246, - (short) 8, - (short) 14, - (short) 8, - (short) 142, - (short) 8, - (short) 78, - (short) 8, - (short) 206, - (short) 8, - (short) 46, - (short) 8, - (short) 174, - (short) 8, - (short) 110, - (short) 8, - (short) 238, - (short) 8, - (short) 30, - (short) 8, - (short) 158, - (short) 8, - (short) 94, - (short) 8, - (short) 222, - (short) 8, - (short) 62, - (short) 8, - (short) 190, - (short) 8, - (short) 126, - (short) 8, - (short) 254, - (short) 8, - (short) 1, - (short) 8, - (short) 129, - (short) 8, - (short) 65, - (short) 8, - (short) 193, - (short) 8, - (short) 33, - (short) 8, - (short) 161, - (short) 8, - (short) 97, - (short) 8, - (short) 225, - (short) 8, - (short) 17, - (short) 8, - (short) 145, - (short) 8, - (short) 81, - (short) 8, - (short) 209, - (short) 8, - (short) 49, - (short) 8, - (short) 177, - (short) 8, - (short) 113, - (short) 8, - (short) 241, - (short) 8, - (short) 9, - (short) 8, - (short) 137, - (short) 8, - (short) 73, - (short) 8, - (short) 201, - (short) 8, - (short) 41, - (short) 8, - (short) 169, - (short) 8, - (short) 105, - (short) 8, - (short) 233, - (short) 8, - (short) 25, - (short) 8, - (short) 153, - (short) 8, - (short) 89, - (short) 8, - (short) 217, - (short) 8, - (short) 57, - (short) 8, - (short) 185, - (short) 8, - (short) 121, - (short) 8, - (short) 249, - (short) 8, - (short) 5, - (short) 8, - (short) 133, - (short) 8, - (short) 69, - (short) 8, - (short) 197, - (short) 8, - (short) 37, - (short) 8, - (short) 165, - (short) 8, - (short) 101, - (short) 8, - (short) 229, - (short) 8, - (short) 21, - (short) 8, - (short) 149, - (short) 8, - (short) 85, - (short) 8, - (short) 213, - (short) 8, - (short) 53, - (short) 8, - (short) 181, - (short) 8, - (short) 117, - (short) 8, - (short) 245, - (short) 8, - (short) 13, - (short) 8, - (short) 141, - (short) 8, - (short) 77, - (short) 8, - (short) 205, - (short) 8, - (short) 45, - (short) 8, - (short) 173, - (short) 8, - (short) 109, - (short) 8, - (short) 237, - (short) 8, - (short) 29, - (short) 8, - (short) 157, - (short) 8, - (short) 93, - (short) 8, - (short) 221, - (short) 8, - (short) 61, - (short) 8, - (short) 189, - (short) 8, - (short) 125, - (short) 8, - (short) 253, - (short) 8, - (short) 19, - (short) 9, - (short) 275, - (short) 9, - (short) 147, - (short) 9, - (short) 403, - (short) 9, - (short) 83, - (short) 9, - (short) 339, - (short) 9, - (short) 211, - (short) 9, - (short) 467, - (short) 9, - (short) 51, - (short) 9, - (short) 307, - (short) 9, - (short) 179, - (short) 9, - (short) 435, - (short) 9, - (short) 115, - (short) 9, - (short) 371, - (short) 9, - (short) 243, - (short) 9, - (short) 499, - (short) 9, - (short) 11, - (short) 9, - (short) 267, - (short) 9, - (short) 139, - (short) 9, - (short) 395, - (short) 9, - (short) 75, - (short) 9, - (short) 331, - (short) 9, - (short) 203, - (short) 9, - (short) 459, - (short) 9, - (short) 43, - (short) 9, - (short) 299, - (short) 9, - (short) 171, - (short) 9, - (short) 427, - (short) 9, - (short) 107, - (short) 9, - (short) 363, - (short) 9, - (short) 235, - (short) 9, - (short) 491, - (short) 9, - (short) 27, - (short) 9, - (short) 283, - (short) 9, - (short) 155, - (short) 9, - (short) 411, - (short) 9, - (short) 91, - (short) 9, - (short) 347, - (short) 9, - (short) 219, - (short) 9, - (short) 475, - (short) 9, - (short) 59, - (short) 9, - (short) 315, - (short) 9, - (short) 187, - (short) 9, - (short) 443, - (short) 9, - (short) 123, - (short) 9, - (short) 379, - (short) 9, - (short) 251, - (short) 9, - (short) 507, - (short) 9, - (short) 7, - (short) 9, - (short) 263, - (short) 9, - (short) 135, - (short) 9, - (short) 391, - (short) 9, - (short) 71, - (short) 9, - (short) 327, - (short) 9, - (short) 199, - (short) 9, - (short) 455, - (short) 9, - (short) 39, - (short) 9, - (short) 295, - (short) 9, - (short) 167, - (short) 9, - (short) 423, - (short) 9, - (short) 103, - (short) 9, - (short) 359, - (short) 9, - (short) 231, - (short) 9, - (short) 487, - (short) 9, - (short) 23, - (short) 9, - (short) 279, - (short) 9, - (short) 151, - (short) 9, - (short) 407, - (short) 9, - (short) 87, - (short) 9, - (short) 343, - (short) 9, - (short) 215, - (short) 9, - (short) 471, - (short) 9, - (short) 55, - (short) 9, - (short) 311, - (short) 9, - (short) 183, - (short) 9, - (short) 439, - (short) 9, - (short) 119, - (short) 9, - (short) 375, - (short) 9, - (short) 247, - (short) 9, - (short) 503, - (short) 9, - (short) 15, - (short) 9, - (short) 271, - (short) 9, - (short) 143, - (short) 9, - (short) 399, - (short) 9, - (short) 79, - (short) 9, - (short) 335, - (short) 9, - (short) 207, - (short) 9, - (short) 463, - (short) 9, - (short) 47, - (short) 9, - (short) 303, - (short) 9, - (short) 175, - (short) 9, - (short) 431, - (short) 9, - (short) 111, - (short) 9, - (short) 367, - (short) 9, - (short) 239, - (short) 9, - (short) 495, - (short) 9, - (short) 31, - (short) 9, - (short) 287, - (short) 9, - (short) 159, - (short) 9, - (short) 415, - (short) 9, - (short) 95, - (short) 9, - (short) 351, - (short) 9, - (short) 223, - (short) 9, - (short) 479, - (short) 9, - (short) 63, - (short) 9, - (short) 319, - (short) 9, - (short) 191, - (short) 9, - (short) 447, - (short) 9, - (short) sbyte.MaxValue, - (short) 9, - (short) 383, - (short) 9, - (short) byte.MaxValue, - (short) 9, - (short) 511, - (short) 9, - (short) 0, - (short) 7, - (short) 64, - (short) 7, - (short) 32, - (short) 7, - (short) 96, - (short) 7, - (short) 16, - (short) 7, - (short) 80, - (short) 7, - (short) 48, - (short) 7, - (short) 112, - (short) 7, - (short) 8, - (short) 7, - (short) 72, - (short) 7, - (short) 40, - (short) 7, - (short) 104, - (short) 7, - (short) 24, - (short) 7, - (short) 88, - (short) 7, - (short) 56, - (short) 7, - (short) 120, - (short) 7, - (short) 4, - (short) 7, - (short) 68, - (short) 7, - (short) 36, - (short) 7, - (short) 100, - (short) 7, - (short) 20, - (short) 7, - (short) 84, - (short) 7, - (short) 52, - (short) 7, - (short) 116, - (short) 7, - (short) 3, - (short) 8, - (short) 131, - (short) 8, - (short) 67, - (short) 8, - (short) 195, - (short) 8, - (short) 35, - (short) 8, - (short) 163, - (short) 8, - (short) 99, - (short) 8, - (short) 227, - (short) 8 - }; - internal static readonly short[] distTreeCodes = new short[60] - { - (short) 0, - (short) 5, - (short) 16, - (short) 5, - (short) 8, - (short) 5, - (short) 24, - (short) 5, - (short) 4, - (short) 5, - (short) 20, - (short) 5, - (short) 12, - (short) 5, - (short) 28, - (short) 5, - (short) 2, - (short) 5, - (short) 18, - (short) 5, - (short) 10, - (short) 5, - (short) 26, - (short) 5, - (short) 6, - (short) 5, - (short) 22, - (short) 5, - (short) 14, - (short) 5, - (short) 30, - (short) 5, - (short) 1, - (short) 5, - (short) 17, - (short) 5, - (short) 9, - (short) 5, - (short) 25, - (short) 5, - (short) 5, - (short) 5, - (short) 21, - (short) 5, - (short) 13, - (short) 5, - (short) 29, - (short) 5, - (short) 3, - (short) 5, - (short) 19, - (short) 5, - (short) 11, - (short) 5, - (short) 27, - (short) 5, - (short) 7, - (short) 5, - (short) 23, - (short) 5 - }; - internal static readonly StaticTree Literals = new StaticTree(StaticTree.lengthAndLiteralsTreeCodes, Tree.ExtraLengthBits, InternalConstants.LITERALS + 1, InternalConstants.L_CODES, InternalConstants.MAX_BITS); - internal static readonly StaticTree Distances = new StaticTree(StaticTree.distTreeCodes, Tree.ExtraDistanceBits, 0, InternalConstants.D_CODES, InternalConstants.MAX_BITS); - internal static readonly StaticTree BitLengths = new StaticTree((short[]) null, Tree.extra_blbits, 0, InternalConstants.BL_CODES, InternalConstants.MAX_BL_BITS); - internal short[] treeCodes; - internal int[] extraBits; - internal int extraBase; - internal int elems; - internal int maxLength; - - private StaticTree( - short[] treeCodes, - int[] extraBits, - int extraBase, - int elems, - int maxLength) - { - this.treeCodes = treeCodes; - this.extraBits = extraBits; - this.extraBase = extraBase; - this.elems = elems; - this.maxLength = maxLength; - } - } -} diff --git a/Src/IonicZipFiles/Zlib/Tree.cs b/Src/IonicZipFiles/Zlib/Tree.cs deleted file mode 100644 index e9d102a9..00000000 --- a/Src/IonicZipFiles/Zlib/Tree.cs +++ /dev/null @@ -1,1122 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.Tree -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; - -namespace Ionic.Zlib -{ - internal sealed class Tree - { - internal const int Buf_size = 16; - private static readonly int HEAP_SIZE = 2 * InternalConstants.L_CODES + 1; - internal static readonly int[] ExtraLengthBits = new int[29] - { - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 3, - 3, - 3, - 3, - 4, - 4, - 4, - 4, - 5, - 5, - 5, - 5, - 0 - }; - internal static readonly int[] ExtraDistanceBits = new int[30] - { - 0, - 0, - 0, - 0, - 1, - 1, - 2, - 2, - 3, - 3, - 4, - 4, - 5, - 5, - 6, - 6, - 7, - 7, - 8, - 8, - 9, - 9, - 10, - 10, - 11, - 11, - 12, - 12, - 13, - 13 - }; - internal static readonly int[] extra_blbits = new int[19] - { - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 3, - 7 - }; - internal static readonly sbyte[] bl_order = new sbyte[19] - { - (sbyte) 16, - (sbyte) 17, - (sbyte) 18, - (sbyte) 0, - (sbyte) 8, - (sbyte) 7, - (sbyte) 9, - (sbyte) 6, - (sbyte) 10, - (sbyte) 5, - (sbyte) 11, - (sbyte) 4, - (sbyte) 12, - (sbyte) 3, - (sbyte) 13, - (sbyte) 2, - (sbyte) 14, - (sbyte) 1, - (sbyte) 15 - }; - private static readonly sbyte[] _dist_code = new sbyte[512] - { - (sbyte) 0, - (sbyte) 1, - (sbyte) 2, - (sbyte) 3, - (sbyte) 4, - (sbyte) 4, - (sbyte) 5, - (sbyte) 5, - (sbyte) 6, - (sbyte) 6, - (sbyte) 6, - (sbyte) 6, - (sbyte) 7, - (sbyte) 7, - (sbyte) 7, - (sbyte) 7, - (sbyte) 8, - (sbyte) 8, - (sbyte) 8, - (sbyte) 8, - (sbyte) 8, - (sbyte) 8, - (sbyte) 8, - (sbyte) 8, - (sbyte) 9, - (sbyte) 9, - (sbyte) 9, - (sbyte) 9, - (sbyte) 9, - (sbyte) 9, - (sbyte) 9, - (sbyte) 9, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 10, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 11, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 0, - (sbyte) 0, - (sbyte) 16, - (sbyte) 17, - (sbyte) 18, - (sbyte) 18, - (sbyte) 19, - (sbyte) 19, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 28, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29, - (sbyte) 29 - }; - internal static readonly sbyte[] LengthCode = new sbyte[256] - { - (sbyte) 0, - (sbyte) 1, - (sbyte) 2, - (sbyte) 3, - (sbyte) 4, - (sbyte) 5, - (sbyte) 6, - (sbyte) 7, - (sbyte) 8, - (sbyte) 8, - (sbyte) 9, - (sbyte) 9, - (sbyte) 10, - (sbyte) 10, - (sbyte) 11, - (sbyte) 11, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 12, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 13, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 14, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 15, - (sbyte) 16, - (sbyte) 16, - (sbyte) 16, - (sbyte) 16, - (sbyte) 16, - (sbyte) 16, - (sbyte) 16, - (sbyte) 16, - (sbyte) 17, - (sbyte) 17, - (sbyte) 17, - (sbyte) 17, - (sbyte) 17, - (sbyte) 17, - (sbyte) 17, - (sbyte) 17, - (sbyte) 18, - (sbyte) 18, - (sbyte) 18, - (sbyte) 18, - (sbyte) 18, - (sbyte) 18, - (sbyte) 18, - (sbyte) 18, - (sbyte) 19, - (sbyte) 19, - (sbyte) 19, - (sbyte) 19, - (sbyte) 19, - (sbyte) 19, - (sbyte) 19, - (sbyte) 19, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 20, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 21, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 22, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 23, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 24, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 25, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 26, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 27, - (sbyte) 28 - }; - internal static readonly int[] LengthBase = new int[29] - { - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 10, - 12, - 14, - 16, - 20, - 24, - 28, - 32, - 40, - 48, - 56, - 64, - 80, - 96, - 112, - 128, - 160, - 192, - 224, - 0 - }; - internal static readonly int[] DistanceBase = new int[30] - { - 0, - 1, - 2, - 3, - 4, - 6, - 8, - 12, - 16, - 24, - 32, - 48, - 64, - 96, - 128, - 192, - 256, - 384, - 512, - 768, - 1024, - 1536, - 2048, - 3072, - 4096, - 6144, - 8192, - 12288, - 16384, - 24576 - }; - internal short[] dyn_tree; - internal int max_code; - internal StaticTree staticTree; - - internal static int DistanceCode(int dist) => dist >= 256 ? (int) Tree._dist_code[256 + SharedUtils.URShift(dist, 7)] : (int) Tree._dist_code[dist]; - - internal void gen_bitlen(DeflateManager s) - { - short[] dynTree = this.dyn_tree; - short[] treeCodes = this.staticTree.treeCodes; - int[] extraBits = this.staticTree.extraBits; - int extraBase = this.staticTree.extraBase; - int maxLength = this.staticTree.maxLength; - int num1 = 0; - for (int index = 0; index <= InternalConstants.MAX_BITS; ++index) - s.bl_count[index] = (short) 0; - dynTree[s.heap[s.heap_max] * 2 + 1] = (short) 0; - int index1; - for (index1 = s.heap_max + 1; index1 < Tree.HEAP_SIZE; ++index1) - { - int num2 = s.heap[index1]; - int index2 = (int) dynTree[(int) dynTree[num2 * 2 + 1] * 2 + 1] + 1; - if (index2 > maxLength) - { - index2 = maxLength; - ++num1; - } - dynTree[num2 * 2 + 1] = (short) index2; - if (num2 <= this.max_code) - { - ++s.bl_count[index2]; - int num3 = 0; - if (num2 >= extraBase) - num3 = extraBits[num2 - extraBase]; - short num4 = dynTree[num2 * 2]; - s.opt_len += (int) num4 * (index2 + num3); - if (treeCodes != null) - s.static_len += (int) num4 * ((int) treeCodes[num2 * 2 + 1] + num3); - } - } - if (num1 == 0) - return; - do - { - int index3 = maxLength - 1; - while (s.bl_count[index3] == (short) 0) - --index3; - --s.bl_count[index3]; - s.bl_count[index3 + 1] = (short) ((int) s.bl_count[index3 + 1] + 2); - --s.bl_count[maxLength]; - num1 -= 2; - } - while (num1 > 0); - for (int index4 = maxLength; index4 != 0; --index4) - { - int num5 = (int) s.bl_count[index4]; - while (num5 != 0) - { - int num6 = s.heap[--index1]; - if (num6 <= this.max_code) - { - if ((int) dynTree[num6 * 2 + 1] != index4) - { - s.opt_len = (int) ((long) s.opt_len + ((long) index4 - (long) dynTree[num6 * 2 + 1]) * (long) dynTree[num6 * 2]); - dynTree[num6 * 2 + 1] = (short) index4; - } - --num5; - } - } - } - } - - internal void build_tree(DeflateManager s) - { - short[] dynTree = this.dyn_tree; - short[] treeCodes = this.staticTree.treeCodes; - int elems = this.staticTree.elems; - int max_code = -1; - s.heap_len = 0; - s.heap_max = Tree.HEAP_SIZE; - for (int index = 0; index < elems; ++index) - { - if (dynTree[index * 2] != (short) 0) - { - s.heap[++s.heap_len] = max_code = index; - s.depth[index] = (sbyte) 0; - } - else - dynTree[index * 2 + 1] = (short) 0; - } - while (s.heap_len < 2) - { - int[] heap = s.heap; - int index1 = ++s.heap_len; - int num1; - if (max_code >= 2) - num1 = 0; - else - max_code = num1 = max_code + 1; - int num2 = num1; - heap[index1] = num1; - int index2 = num2; - dynTree[index2 * 2] = (short) 1; - s.depth[index2] = (sbyte) 0; - --s.opt_len; - if (treeCodes != null) - s.static_len -= (int) treeCodes[index2 * 2 + 1]; - } - this.max_code = max_code; - for (int k = s.heap_len / 2; k >= 1; --k) - s.pqdownheap(dynTree, k); - int index3 = elems; - do - { - int index4 = s.heap[1]; - s.heap[1] = s.heap[s.heap_len--]; - s.pqdownheap(dynTree, 1); - int index5 = s.heap[1]; - s.heap[--s.heap_max] = index4; - s.heap[--s.heap_max] = index5; - dynTree[index3 * 2] = (short) ((int) dynTree[index4 * 2] + (int) dynTree[index5 * 2]); - s.depth[index3] = (sbyte) ((int) Math.Max((byte) s.depth[index4], (byte) s.depth[index5]) + 1); - dynTree[index4 * 2 + 1] = dynTree[index5 * 2 + 1] = (short) index3; - s.heap[1] = index3++; - s.pqdownheap(dynTree, 1); - } - while (s.heap_len >= 2); - s.heap[--s.heap_max] = s.heap[1]; - this.gen_bitlen(s); - Tree.gen_codes(dynTree, max_code, s.bl_count); - } - - internal static void gen_codes(short[] tree, int max_code, short[] bl_count) - { - short[] numArray = new short[InternalConstants.MAX_BITS + 1]; - short num = 0; - for (int index = 1; index <= InternalConstants.MAX_BITS; ++index) - numArray[index] = num = (short) ((int) num + (int) bl_count[index - 1] << 1); - for (int index = 0; index <= max_code; ++index) - { - int len = (int) tree[index * 2 + 1]; - if (len != 0) - tree[index * 2] = (short) Tree.bi_reverse((int) numArray[len]++, len); - } - } - - internal static int bi_reverse(int code, int len) - { - int num1 = 0; - do - { - int num2 = num1 | code & 1; - code >>= 1; - num1 = num2 << 1; - } - while (--len > 0); - return num1 >> 1; - } - } -} diff --git a/Src/IonicZipFiles/Zlib/ZlibBaseStream.cs b/Src/IonicZipFiles/Zlib/ZlibBaseStream.cs deleted file mode 100644 index e3bfab43..00000000 --- a/Src/IonicZipFiles/Zlib/ZlibBaseStream.cs +++ /dev/null @@ -1,422 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.ZlibBaseStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using Ionic.Crc; -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace Ionic.Zlib -{ - internal class ZlibBaseStream : Stream - { - protected internal ZlibCodec _z; - protected internal ZlibBaseStream.StreamMode _streamMode = ZlibBaseStream.StreamMode.Undefined; - protected internal FlushType _flushMode; - protected internal ZlibStreamFlavor _flavor; - protected internal CompressionMode _compressionMode; - protected internal CompressionLevel _level; - protected internal bool _leaveOpen; - protected internal byte[] _workingBuffer; - protected internal int _bufferSize = 8192; - protected internal byte[] _buf1 = new byte[1]; - protected internal Stream _stream; - protected internal CompressionStrategy Strategy; - private CRC32 crc; - protected internal string _GzipFileName; - protected internal string _GzipComment; - protected internal DateTime _GzipMtime; - protected internal int _gzipHeaderByteCount; - private bool nomoreinput; - - internal int Crc32 => this.crc == null ? 0 : this.crc.Crc32Result; - - public ZlibBaseStream( - Stream stream, - CompressionMode compressionMode, - CompressionLevel level, - ZlibStreamFlavor flavor, - bool leaveOpen) - { - this._flushMode = FlushType.None; - this._stream = stream; - this._leaveOpen = leaveOpen; - this._compressionMode = compressionMode; - this._flavor = flavor; - this._level = level; - if (flavor != ZlibStreamFlavor.GZIP) - return; - this.crc = new CRC32(); - } - - protected internal bool _wantCompress => this._compressionMode == CompressionMode.Compress; - - private ZlibCodec z - { - get - { - if (this._z == null) - { - bool flag = this._flavor == ZlibStreamFlavor.ZLIB; - this._z = new ZlibCodec(); - if (this._compressionMode == CompressionMode.Decompress) - { - this._z.InitializeInflate(flag); - } - else - { - this._z.Strategy = this.Strategy; - this._z.InitializeDeflate(this._level, flag); - } - } - return this._z; - } - } - - private byte[] workingBuffer - { - get - { - if (this._workingBuffer == null) - this._workingBuffer = new byte[this._bufferSize]; - return this._workingBuffer; - } - } - - public override void Write(byte[] buffer, int offset, int count) - { - if (this.crc != null) - this.crc.SlurpBlock(buffer, offset, count); - if (this._streamMode == ZlibBaseStream.StreamMode.Undefined) - this._streamMode = ZlibBaseStream.StreamMode.Writer; - else if (this._streamMode != ZlibBaseStream.StreamMode.Writer) - throw new ZlibException("Cannot Write after Reading."); - if (count == 0) - return; - this.z.InputBuffer = buffer; - this._z.NextIn = offset; - this._z.AvailableBytesIn = count; - bool flag; - do - { - this._z.OutputBuffer = this.workingBuffer; - this._z.NextOut = 0; - this._z.AvailableBytesOut = this._workingBuffer.Length; - switch (this._wantCompress ? this._z.Deflate(this._flushMode) : this._z.Inflate(this._flushMode)) - { - case 0: - case 1: - this._stream.Write(this._workingBuffer, 0, this._workingBuffer.Length - this._z.AvailableBytesOut); - flag = this._z.AvailableBytesIn == 0 && this._z.AvailableBytesOut != 0; - if (this._flavor == ZlibStreamFlavor.GZIP && !this._wantCompress) - flag = this._z.AvailableBytesIn == 8 && this._z.AvailableBytesOut != 0; - continue; - default: - throw new ZlibException((this._wantCompress ? "de" : "in") + "flating: " + this._z.Message); - } - } - while (!flag); - } - - private void finish() - { - if (this._z == null) - return; - if (this._streamMode == ZlibBaseStream.StreamMode.Writer) - { - bool flag; - do - { - this._z.OutputBuffer = this.workingBuffer; - this._z.NextOut = 0; - this._z.AvailableBytesOut = this._workingBuffer.Length; - int num = this._wantCompress ? this._z.Deflate(FlushType.Finish) : this._z.Inflate(FlushType.Finish); - switch (num) - { - case 0: - case 1: - if (this._workingBuffer.Length - this._z.AvailableBytesOut > 0) - this._stream.Write(this._workingBuffer, 0, this._workingBuffer.Length - this._z.AvailableBytesOut); - flag = this._z.AvailableBytesIn == 0 && this._z.AvailableBytesOut != 0; - if (this._flavor == ZlibStreamFlavor.GZIP && !this._wantCompress) - flag = this._z.AvailableBytesIn == 8 && this._z.AvailableBytesOut != 0; - continue; - default: - string str = (this._wantCompress ? "de" : "in") + "flating"; - if (this._z.Message == null) - throw new ZlibException(string.Format("{0}: (rc = {1})", (object) str, (object) num)); - throw new ZlibException(str + ": " + this._z.Message); - } - } - while (!flag); - this.Flush(); - if (this._flavor != ZlibStreamFlavor.GZIP) - return; - if (!this._wantCompress) - throw new ZlibException("Writing with decompression is not supported."); - this._stream.Write(BitConverter.GetBytes(this.crc.Crc32Result), 0, 4); - this._stream.Write(BitConverter.GetBytes((int) (this.crc.TotalBytesRead & (long) uint.MaxValue)), 0, 4); - } - else - { - if (this._streamMode != ZlibBaseStream.StreamMode.Reader || this._flavor != ZlibStreamFlavor.GZIP) - return; - if (this._wantCompress) - throw new ZlibException("Reading with compression is not supported."); - if (this._z.TotalBytesOut == 0L) - return; - byte[] numArray = new byte[8]; - if (this._z.AvailableBytesIn < 8) - { - Array.Copy((Array) this._z.InputBuffer, this._z.NextIn, (Array) numArray, 0, this._z.AvailableBytesIn); - int count = 8 - this._z.AvailableBytesIn; - int num = this._stream.Read(numArray, this._z.AvailableBytesIn, count); - if (count != num) - throw new ZlibException(string.Format("Missing or incomplete GZIP trailer. Expected 8 bytes, got {0}.", (object) (this._z.AvailableBytesIn + num))); - } - else - Array.Copy((Array) this._z.InputBuffer, this._z.NextIn, (Array) numArray, 0, numArray.Length); - int int32_1 = BitConverter.ToInt32(numArray, 0); - int crc32Result = this.crc.Crc32Result; - int int32_2 = BitConverter.ToInt32(numArray, 4); - int num1 = (int) (this._z.TotalBytesOut & (long) uint.MaxValue); - if (crc32Result != int32_1) - throw new ZlibException(string.Format("Bad CRC32 in GZIP trailer. (actual({0:X8})!=expected({1:X8}))", (object) crc32Result, (object) int32_1)); - if (num1 != int32_2) - throw new ZlibException(string.Format("Bad size in GZIP trailer. (actual({0})!=expected({1}))", (object) num1, (object) int32_2)); - } - } - - private void end() - { - if (this.z == null) - return; - if (this._wantCompress) - this._z.EndDeflate(); - else - this._z.EndInflate(); - this._z = (ZlibCodec) null; - } - - public override void Close() - { - if (this._stream == null) - return; - try - { - this.finish(); - } - finally - { - this.end(); - if (!this._leaveOpen) - this._stream.Close(); - this._stream = (Stream) null; - } - } - - public override void Flush() => this._stream.Flush(); - - public override long Seek(long offset, SeekOrigin origin) => throw new NotImplementedException(); - - public override void SetLength(long value) => this._stream.SetLength(value); - - private string ReadZeroTerminatedString() - { - List byteList = new List(); - bool flag = false; - while (this._stream.Read(this._buf1, 0, 1) == 1) - { - if (this._buf1[0] == (byte) 0) - flag = true; - else - byteList.Add(this._buf1[0]); - if (flag) - { - byte[] array = byteList.ToArray(); - return GZipStream.iso8859dash1.GetString(array, 0, array.Length); - } - } - throw new ZlibException("Unexpected EOF reading GZIP header."); - } - - private int _ReadAndValidateGzipHeader() - { - int num1 = 0; - byte[] buffer1 = new byte[10]; - int num2 = this._stream.Read(buffer1, 0, buffer1.Length); - switch (num2) - { - case 0: - return 0; - case 10: - int num3 = buffer1[0] == (byte) 31 && buffer1[1] == (byte) 139 && buffer1[2] == (byte) 8 ? BitConverter.ToInt32(buffer1, 4) : throw new ZlibException("Bad GZIP header."); - this._GzipMtime = GZipStream._unixEpoch.AddSeconds((double) num3); - int num4 = num1 + num2; - if (((int) buffer1[3] & 4) == 4) - { - int num5 = this._stream.Read(buffer1, 0, 2); - int num6 = num4 + num5; - short length = (short) ((int) buffer1[0] + (int) buffer1[1] * 256); - byte[] buffer2 = new byte[(int) length]; - int num7 = this._stream.Read(buffer2, 0, buffer2.Length); - if (num7 != (int) length) - throw new ZlibException("Unexpected end-of-file reading GZIP header."); - num4 = num6 + num7; - } - if (((int) buffer1[3] & 8) == 8) - this._GzipFileName = this.ReadZeroTerminatedString(); - if (((int) buffer1[3] & 16) == 16) - this._GzipComment = this.ReadZeroTerminatedString(); - if (((int) buffer1[3] & 2) == 2) - this.Read(this._buf1, 0, 1); - return num4; - default: - throw new ZlibException("Not a valid GZIP stream."); - } - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (this._streamMode == ZlibBaseStream.StreamMode.Undefined) - { - if (!this._stream.CanRead) - throw new ZlibException("The stream is not readable."); - this._streamMode = ZlibBaseStream.StreamMode.Reader; - this.z.AvailableBytesIn = 0; - if (this._flavor == ZlibStreamFlavor.GZIP) - { - this._gzipHeaderByteCount = this._ReadAndValidateGzipHeader(); - if (this._gzipHeaderByteCount == 0) - return 0; - } - } - if (this._streamMode != ZlibBaseStream.StreamMode.Reader) - throw new ZlibException("Cannot Read after Writing."); - if (count == 0 || this.nomoreinput && this._wantCompress) - return 0; - if (buffer == null) - throw new ArgumentNullException(nameof (buffer)); - if (count < 0) - throw new ArgumentOutOfRangeException(nameof (count)); - if (offset < buffer.GetLowerBound(0)) - throw new ArgumentOutOfRangeException(nameof (offset)); - if (offset + count > buffer.GetLength(0)) - throw new ArgumentOutOfRangeException(nameof (count)); - this._z.OutputBuffer = buffer; - this._z.NextOut = offset; - this._z.AvailableBytesOut = count; - this._z.InputBuffer = this.workingBuffer; - int num1; - do - { - if (this._z.AvailableBytesIn == 0 && !this.nomoreinput) - { - this._z.NextIn = 0; - this._z.AvailableBytesIn = this._stream.Read(this._workingBuffer, 0, this._workingBuffer.Length); - if (this._z.AvailableBytesIn == 0) - this.nomoreinput = true; - } - num1 = this._wantCompress ? this._z.Deflate(this._flushMode) : this._z.Inflate(this._flushMode); - if (this.nomoreinput && num1 == -5) - return 0; - if (num1 != 0 && num1 != 1) - throw new ZlibException(string.Format("{0}flating: rc={1} msg={2}", this._wantCompress ? (object) "de" : (object) "in", (object) num1, (object) this._z.Message)); - } - while ((!this.nomoreinput && num1 != 1 || this._z.AvailableBytesOut != count) && this._z.AvailableBytesOut > 0 && !this.nomoreinput && num1 == 0); - if (this._z.AvailableBytesOut > 0) - { - if (num1 == 0) - { - int availableBytesIn = this._z.AvailableBytesIn; - } - if (this.nomoreinput && this._wantCompress) - { - int num2 = this._z.Deflate(FlushType.Finish); - switch (num2) - { - case 0: - case 1: - break; - default: - throw new ZlibException(string.Format("Deflating: rc={0} msg={1}", (object) num2, (object) this._z.Message)); - } - } - } - int count1 = count - this._z.AvailableBytesOut; - if (this.crc != null) - this.crc.SlurpBlock(buffer, offset, count1); - return count1; - } - - public override bool CanRead => this._stream.CanRead; - - public override bool CanSeek => this._stream.CanSeek; - - public override bool CanWrite => this._stream.CanWrite; - - public override long Length => this._stream.Length; - - public override long Position - { - get => throw new NotImplementedException(); - set => throw new NotImplementedException(); - } - - public static void CompressString(string s, Stream compressor) - { - byte[] bytes = Encoding.UTF8.GetBytes(s); - using (compressor) - compressor.Write(bytes, 0, bytes.Length); - } - - public static void CompressBuffer(byte[] b, Stream compressor) - { - using (compressor) - compressor.Write(b, 0, b.Length); - } - - public static string UncompressString(byte[] compressed, Stream decompressor) - { - byte[] buffer = new byte[1024]; - Encoding utF8 = Encoding.UTF8; - using (MemoryStream memoryStream = new MemoryStream()) - { - using (decompressor) - { - int count; - while ((count = decompressor.Read(buffer, 0, buffer.Length)) != 0) - memoryStream.Write(buffer, 0, count); - } - memoryStream.Seek(0L, SeekOrigin.Begin); - return new StreamReader((Stream) memoryStream, utF8).ReadToEnd(); - } - } - - public static byte[] UncompressBuffer(byte[] compressed, Stream decompressor) - { - byte[] buffer = new byte[1024]; - using (MemoryStream memoryStream = new MemoryStream()) - { - using (decompressor) - { - int count; - while ((count = decompressor.Read(buffer, 0, buffer.Length)) != 0) - memoryStream.Write(buffer, 0, count); - } - return memoryStream.ToArray(); - } - } - - internal enum StreamMode - { - Writer, - Reader, - Undefined, - } - } -} diff --git a/Src/IonicZipFiles/Zlib/ZlibCodec.cs b/Src/IonicZipFiles/Zlib/ZlibCodec.cs deleted file mode 100644 index a16eba96..00000000 --- a/Src/IonicZipFiles/Zlib/ZlibCodec.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.ZlibCodec -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zlib -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d0000D")] - [ComVisible(true)] - public sealed class ZlibCodec - { - public byte[] InputBuffer; - public int NextIn; - public int AvailableBytesIn; - public long TotalBytesIn; - public byte[] OutputBuffer; - public int NextOut; - public int AvailableBytesOut; - public long TotalBytesOut; - public string Message; - internal DeflateManager dstate; - internal InflateManager istate; - internal uint _Adler32; - public CompressionLevel CompressLevel = CompressionLevel.Default; - public int WindowBits = 15; - public CompressionStrategy Strategy; - - public int Adler32 => (int) this._Adler32; - - public ZlibCodec() - { - } - - public ZlibCodec(CompressionMode mode) - { - if (mode == CompressionMode.Compress) - { - if (this.InitializeDeflate() != 0) - throw new ZlibException("Cannot initialize for deflate."); - } - else - { - if (mode != CompressionMode.Decompress) - throw new ZlibException("Invalid ZlibStreamFlavor."); - if (this.InitializeInflate() != 0) - throw new ZlibException("Cannot initialize for inflate."); - } - } - - public int InitializeInflate() => this.InitializeInflate(this.WindowBits); - - public int InitializeInflate(bool expectRfc1950Header) => this.InitializeInflate(this.WindowBits, expectRfc1950Header); - - public int InitializeInflate(int windowBits) - { - this.WindowBits = windowBits; - return this.InitializeInflate(windowBits, true); - } - - public int InitializeInflate(int windowBits, bool expectRfc1950Header) - { - this.WindowBits = windowBits; - if (this.dstate != null) - throw new ZlibException("You may not call InitializeInflate() after calling InitializeDeflate()."); - this.istate = new InflateManager(expectRfc1950Header); - return this.istate.Initialize(this, windowBits); - } - - public int Inflate(FlushType flush) => this.istate != null ? this.istate.Inflate(flush) : throw new ZlibException("No Inflate State!"); - - public int EndInflate() - { - int num = this.istate != null ? this.istate.End() : throw new ZlibException("No Inflate State!"); - this.istate = (InflateManager) null; - return num; - } - - public int SyncInflate() => this.istate != null ? this.istate.Sync() : throw new ZlibException("No Inflate State!"); - - public int InitializeDeflate() => this._InternalInitializeDeflate(true); - - public int InitializeDeflate(CompressionLevel level) - { - this.CompressLevel = level; - return this._InternalInitializeDeflate(true); - } - - public int InitializeDeflate(CompressionLevel level, bool wantRfc1950Header) - { - this.CompressLevel = level; - return this._InternalInitializeDeflate(wantRfc1950Header); - } - - public int InitializeDeflate(CompressionLevel level, int bits) - { - this.CompressLevel = level; - this.WindowBits = bits; - return this._InternalInitializeDeflate(true); - } - - public int InitializeDeflate(CompressionLevel level, int bits, bool wantRfc1950Header) - { - this.CompressLevel = level; - this.WindowBits = bits; - return this._InternalInitializeDeflate(wantRfc1950Header); - } - - private int _InternalInitializeDeflate(bool wantRfc1950Header) - { - if (this.istate != null) - throw new ZlibException("You may not call InitializeDeflate() after calling InitializeInflate()."); - this.dstate = new DeflateManager(); - this.dstate.WantRfc1950HeaderBytes = wantRfc1950Header; - return this.dstate.Initialize(this, this.CompressLevel, this.WindowBits, this.Strategy); - } - - public int Deflate(FlushType flush) => this.dstate != null ? this.dstate.Deflate(flush) : throw new ZlibException("No Deflate State!"); - - public int EndDeflate() - { - this.dstate = this.dstate != null ? (DeflateManager) null : throw new ZlibException("No Deflate State!"); - return 0; - } - - public void ResetDeflate() - { - if (this.dstate == null) - throw new ZlibException("No Deflate State!"); - this.dstate.Reset(); - } - - public int SetDeflateParams(CompressionLevel level, CompressionStrategy strategy) - { - if (this.dstate == null) - throw new ZlibException("No Deflate State!"); - return this.dstate.SetParams(level, strategy); - } - - public int SetDictionary(byte[] dictionary) - { - if (this.istate != null) - return this.istate.SetDictionary(dictionary); - return this.dstate != null ? this.dstate.SetDictionary(dictionary) : throw new ZlibException("No Inflate or Deflate state!"); - } - - internal void flush_pending() - { - int length = this.dstate.pendingCount; - if (length > this.AvailableBytesOut) - length = this.AvailableBytesOut; - if (length == 0) - return; - if (this.dstate.pending.Length <= this.dstate.nextPending || this.OutputBuffer.Length <= this.NextOut || this.dstate.pending.Length < this.dstate.nextPending + length || this.OutputBuffer.Length < this.NextOut + length) - throw new ZlibException(string.Format("Invalid State. (pending.Length={0}, pendingCount={1})", (object) this.dstate.pending.Length, (object) this.dstate.pendingCount)); - Array.Copy((Array) this.dstate.pending, this.dstate.nextPending, (Array) this.OutputBuffer, this.NextOut, length); - this.NextOut += length; - this.dstate.nextPending += length; - this.TotalBytesOut += (long) length; - this.AvailableBytesOut -= length; - this.dstate.pendingCount -= length; - if (this.dstate.pendingCount != 0) - return; - this.dstate.nextPending = 0; - } - - internal int read_buf(byte[] buf, int start, int size) - { - int num = this.AvailableBytesIn; - if (num > size) - num = size; - if (num == 0) - return 0; - this.AvailableBytesIn -= num; - if (this.dstate.WantRfc1950HeaderBytes) - this._Adler32 = Adler.Adler32(this._Adler32, this.InputBuffer, this.NextIn, num); - Array.Copy((Array) this.InputBuffer, this.NextIn, (Array) buf, start, num); - this.NextIn += num; - this.TotalBytesIn += (long) num; - return num; - } - } -} diff --git a/Src/IonicZipFiles/Zlib/ZlibConstants.cs b/Src/IonicZipFiles/Zlib/ZlibConstants.cs deleted file mode 100644 index 32b6a0a7..00000000 --- a/Src/IonicZipFiles/Zlib/ZlibConstants.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.ZlibConstants -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - public static class ZlibConstants - { - public const int WindowBitsMax = 15; - public const int WindowBitsDefault = 15; - public const int Z_OK = 0; - public const int Z_STREAM_END = 1; - public const int Z_NEED_DICT = 2; - public const int Z_STREAM_ERROR = -2; - public const int Z_DATA_ERROR = -3; - public const int Z_BUF_ERROR = -5; - public const int WorkingBufferSizeDefault = 8192; - public const int WorkingBufferSizeMin = 1024; - } -} diff --git a/Src/IonicZipFiles/Zlib/ZlibException.cs b/Src/IonicZipFiles/Zlib/ZlibException.cs deleted file mode 100644 index dca8ab7f..00000000 --- a/Src/IonicZipFiles/Zlib/ZlibException.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.ZlibException -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.Runtime.InteropServices; - -namespace Ionic.Zlib -{ - [Guid("ebc25cf6-9120-4283-b972-0e5520d0000E")] - public class ZlibException : Exception - { - public ZlibException() - { - } - - public ZlibException(string s) - : base(s) - { - } - } -} diff --git a/Src/IonicZipFiles/Zlib/ZlibStream.cs b/Src/IonicZipFiles/Zlib/ZlibStream.cs deleted file mode 100644 index 70dfeb5e..00000000 --- a/Src/IonicZipFiles/Zlib/ZlibStream.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.ZlibStream -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System; -using System.IO; - -namespace Ionic.Zlib -{ - public class ZlibStream : Stream - { - internal ZlibBaseStream _baseStream; - private bool _disposed; - - public ZlibStream(Stream stream, CompressionMode mode) - : this(stream, mode, CompressionLevel.Default, false) - { - } - - public ZlibStream(Stream stream, CompressionMode mode, CompressionLevel level) - : this(stream, mode, level, false) - { - } - - public ZlibStream(Stream stream, CompressionMode mode, bool leaveOpen) - : this(stream, mode, CompressionLevel.Default, leaveOpen) - { - } - - public ZlibStream(Stream stream, CompressionMode mode, CompressionLevel level, bool leaveOpen) => this._baseStream = new ZlibBaseStream(stream, mode, level, ZlibStreamFlavor.ZLIB, leaveOpen); - - public virtual FlushType FlushMode - { - get => this._baseStream._flushMode; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - this._baseStream._flushMode = value; - } - } - - public int BufferSize - { - get => this._baseStream._bufferSize; - set - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - if (this._baseStream._workingBuffer != null) - throw new ZlibException("The working buffer is already set."); - this._baseStream._bufferSize = value >= 1024 ? value : throw new ZlibException(string.Format("Don't be silly. {0} bytes?? Use a bigger buffer, at least {1}.", (object) value, (object) 1024)); - } - } - - public virtual long TotalIn => this._baseStream._z.TotalBytesIn; - - public virtual long TotalOut => this._baseStream._z.TotalBytesOut; - - protected override void Dispose(bool disposing) - { - try - { - if (this._disposed) - return; - if (disposing && this._baseStream != null) - this._baseStream.Close(); - this._disposed = true; - } - finally - { - base.Dispose(disposing); - } - } - - public override bool CanRead - { - get - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - return this._baseStream._stream.CanRead; - } - } - - public override bool CanSeek => false; - - public override bool CanWrite - { - get - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - return this._baseStream._stream.CanWrite; - } - } - - public override void Flush() - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - this._baseStream.Flush(); - } - - public override long Length => throw new NotSupportedException(); - - public override long Position - { - get - { - if (this._baseStream._streamMode == ZlibBaseStream.StreamMode.Writer) - return this._baseStream._z.TotalBytesOut; - return this._baseStream._streamMode == ZlibBaseStream.StreamMode.Reader ? this._baseStream._z.TotalBytesIn : 0L; - } - set => throw new NotSupportedException(); - } - - public override int Read(byte[] buffer, int offset, int count) - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - return this._baseStream.Read(buffer, offset, count); - } - - public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); - - public override void SetLength(long value) => throw new NotSupportedException(); - - public override void Write(byte[] buffer, int offset, int count) - { - if (this._disposed) - throw new ObjectDisposedException(nameof (ZlibStream)); - this._baseStream.Write(buffer, offset, count); - } - - public static byte[] CompressString(string s) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - Stream compressor = (Stream) new ZlibStream((Stream) memoryStream, CompressionMode.Compress, CompressionLevel.BestCompression); - ZlibBaseStream.CompressString(s, compressor); - return memoryStream.ToArray(); - } - } - - public static byte[] CompressBuffer(byte[] b) - { - using (MemoryStream memoryStream = new MemoryStream()) - { - Stream compressor = (Stream) new ZlibStream((Stream) memoryStream, CompressionMode.Compress, CompressionLevel.BestCompression); - ZlibBaseStream.CompressBuffer(b, compressor); - return memoryStream.ToArray(); - } - } - - public static string UncompressString(byte[] compressed) - { - using (MemoryStream memoryStream = new MemoryStream(compressed)) - { - Stream decompressor = (Stream) new ZlibStream((Stream) memoryStream, CompressionMode.Decompress); - return ZlibBaseStream.UncompressString(compressed, decompressor); - } - } - - public static byte[] UncompressBuffer(byte[] compressed) - { - using (MemoryStream memoryStream = new MemoryStream(compressed)) - { - Stream decompressor = (Stream) new ZlibStream((Stream) memoryStream, CompressionMode.Decompress); - return ZlibBaseStream.UncompressBuffer(compressed, decompressor); - } - } - } -} diff --git a/Src/IonicZipFiles/Zlib/ZlibStreamFlavor.cs b/Src/IonicZipFiles/Zlib/ZlibStreamFlavor.cs deleted file mode 100644 index 75b14439..00000000 --- a/Src/IonicZipFiles/Zlib/ZlibStreamFlavor.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Ionic.Zlib.ZlibStreamFlavor -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -namespace Ionic.Zlib -{ - internal enum ZlibStreamFlavor - { - ZLIB = 1950, // 0x0000079E - DEFLATE = 1951, // 0x0000079F - GZIP = 1952, // 0x000007A0 - } -} diff --git a/Src/IonicZipFiles/_003CPrivateImplementationDetails_003E{3D63C7F2-9F.cs b/Src/IonicZipFiles/_003CPrivateImplementationDetails_003E{3D63C7F2-9F.cs deleted file mode 100644 index a2268736..00000000 --- a/Src/IonicZipFiles/_003CPrivateImplementationDetails_003E{3D63C7F2-9F.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: {3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A} -// Assembly: Ionic.Zip.CF, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c -// MVID: 3D63C7F2-9FA1-46C2-9CAE-E29323A47C7A -// Assembly location: C:\Users\Admin\Desktop\re\CF.dll - -using System.Runtime.InteropServices; - -internal class \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D -{ - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D12 \u0024\u0024method0x600008b\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D56 \u0024\u0024method0x6000416\u002D1; - internal static int \u0024\u0024method0x60002e9\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D2048 \u0024\u0024method0x6000418\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D76 \u0024\u0024method0x600041b\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D68 \u0024\u0024method0x600041c\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D6144 \u0024\u0024method0x600041e\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D384 \u0024\u0024method0x600041e\u002D2; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D124 \u0024\u0024method0x600041e\u002D3; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D124 \u0024\u0024method0x600041e\u002D4; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D120 \u0024\u0024method0x600041e\u002D5; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D120 \u0024\u0024method0x600041e\u002D6; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D116 \u0024\u0024method0x600041f\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D120 \u0024\u0024method0x600041f\u002D2; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D76 \u0024\u0024method0x600041f\u002D3; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D19 \u0024\u0024method0x600041f\u002D4; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D512 \u0024\u0024method0x600041f\u002D5; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D256 \u0024\u0024method0x600041f\u002D6; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D116 \u0024\u0024method0x600041f\u002D7; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D120 \u0024\u0024method0x600041f\u002D8; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D1152 \u0024\u0024method0x600038e\u002D1; - internal static \u003CPrivateImplementationDetails\u003E\u007B3D63C7F2\u002D9FA1\u002D46C2\u002D9CAE\u002DE29323A47C7A\u007D.__StaticArrayInitTypeSize\u003D120 \u0024\u0024method0x600038e\u002D2; - - [StructLayout(LayoutKind.Explicit, Size = 12, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D12 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 56, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D56 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 2048, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D2048 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 76, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D76 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 68, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D68 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 6144, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D6144 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 384, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D384 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 124, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D124 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 120, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D120 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 116, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D116 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 19, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D19 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 512, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D512 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 256, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D256 - { - } - - [StructLayout(LayoutKind.Explicit, Size = 1152, Pack = 1)] - private struct __StaticArrayInitTypeSize\u003D1152 - { - } -} diff --git a/Src/MT1Beta/Content/Wave Bank.xwb b/Src/MT1Beta/Content/Wave Bank.xwb index e764fb63..beae4b6f 100644 Binary files a/Src/MT1Beta/Content/Wave Bank.xwb and b/Src/MT1Beta/Content/Wave Bank.xwb differ diff --git a/Src/MT1Beta/Content/_Wave Bank.xwb b/Src/MT1Beta/Content/_Wave Bank.xwb new file mode 100644 index 00000000..e764fb63 Binary files /dev/null and b/Src/MT1Beta/Content/_Wave Bank.xwb differ diff --git a/Src/MT1Beta/Main/Game1.cs b/Src/MT1Beta/Main/Game1.cs index 509f69b0..d7ca8993 100644 --- a/Src/MT1Beta/Main/Game1.cs +++ b/Src/MT1Beta/Main/Game1.cs @@ -8,6 +8,8 @@ using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework.Input.Touch; + using System; using System.IO; using System.Runtime.InteropServices; @@ -51,22 +53,34 @@ public class Game1 : Game //RnD public static bool grabSun = true;//false; - public static bool debugMode = true;//false; + + public static bool debugMode = true;//set True for/to debug + public static bool godMode = true;//false; + public static bool stopSpawns = false; + public static bool dumbAI = false; - public static bool skipMenu = false; + public static bool skipMenu = false;//false; + public static bool lightTiles = false; public static bool verboseNetplay = false; public static bool stopTimeOuts = false; public static bool showSpam = false; public static bool showItemOwner = false; public static string defaultIP = "74.132.0.65"; + private GraphicsDeviceManager graphics; private SpriteBatch spriteBatch; - public static MouseState mouseState = Mouse.GetState(); - public static MouseState oldMouseState = Mouse.GetState(); + + public static MouseState mouseState1 = Mouse.GetState(); + public static TouchCollection mouseState = TouchPanel.GetState();//Experimental + + // public static MouseState oldMouseState = Mouse.GetState(); + public static MouseState oldMouseState1 = Mouse.GetState(); + public static TouchCollection oldMouseState = TouchPanel.GetState();//Experimental + public static KeyboardState keyState = Keyboard.GetState(); public static int updateTime = 0; public static int drawTime = 0; @@ -398,7 +412,14 @@ public class Game1 : Game private float logoScaleDirection = 1f; private float logoScaleSpeed = 1f; private static int maxMenuItems = 11; - private float[] menuItemScale = new float[Game1.maxMenuItems]; + + private float[] menuItemScale = new float[] + { 1, 1, 1, + 1,1,1,1, + 1,1,1,1, + 1,1 + };// new float[Game1.maxMenuItems]; + private int focusMenu = -1; private int selectedMenu = -1; private int selectedPlayer = 0; @@ -411,14 +432,24 @@ public class Game1 : Game private int focusColor = 0; private int colorDelay = 0; - [DllImport("User32")] - private static extern int RemoveMenu(IntPtr hMenu, int nPosition, int wFlags); + //[DllImport("User32")] + private static /*extern*/ int RemoveMenu(IntPtr hMenu, int nPosition, int wFlags) + { + return default; + } - [DllImport("User32")] - private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert); + //[DllImport("User32")] + private static /*extern*/ IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert) + { + return default; + } - [DllImport("User32")] - private static extern int GetMenuItemCount(IntPtr hWnd); + //[DllImport("User32")] + private static /*extern*/ int GetMenuItemCount(IntPtr hWnd) + { + int menuItemsCount = 11; + return menuItemsCount;//default; + } public static void LoadWorlds() { @@ -757,8 +788,10 @@ protected override void Initialize() Game1.wallHouse[10] = true; Game1.wallHouse[11] = true; Game1.wallHouse[12] = true; + for (int index = 0; index < Game1.maxMenuItems; ++index) this.menuItemScale[index] = 0.8f; + for (int index = 0; index < 2000; ++index) Game1.dust[index] = new Dust(); for (int index = 0; index < 201; ++index) @@ -808,6 +841,7 @@ protected override void Initialize() Game1.teamColor[3] = new Color(75, 90, (int) byte.MaxValue); Game1.teamColor[4] = new Color(200, 180, 0); Netplay.Init(); + if (Game1.skipMenu) { WorldGen.clearWorld(); @@ -819,6 +853,9 @@ protected override void Initialize() WorldGen.generateWorld(); WorldGen.EveryTileFrame(); Game1.player[Game1.myPlayer].Spawn(); + //IntPtr systemMenu = Game1.GetSystemMenu(this.Window.Handle, false); + //int menuItemCount = Game1.GetMenuItemCount(systemMenu); + //Game1.RemoveMenu(systemMenu, menuItemCount - 1, 1024); } else { @@ -826,6 +863,7 @@ protected override void Initialize() int menuItemCount = Game1.GetMenuItemCount(systemMenu); Game1.RemoveMenu(systemMenu, menuItemCount - 1, 1024); } + base.Initialize(); Star.SpawnStars(); } @@ -835,8 +873,10 @@ protected override void LoadContent() Game1.engine = new AudioEngine("Content\\TerrariaMusic.xgs"); Game1.soundBank = new SoundBank(Game1.engine, "Content\\Sound Bank.xsb"); Game1.waveBank = new WaveBank(Game1.engine, "Content\\Wave Bank.xwb"); + for (int index = 1; index < 6; ++index) Game1.music[index] = Game1.soundBank.GetCue("Music_" + (object) index); + this.spriteBatch = new SpriteBatch(this.GraphicsDevice); for (int index = 0; index < 76; ++index) Game1.tileTexture[index] = this.Content.Load("Images\\Tiles_" + (object) index); @@ -992,6 +1032,7 @@ protected void UpdateMusic() } } } + if ((double) Game1.musicVolume == 0.0) this.newMusic = 0; else if (Game1.gameMenu) @@ -1008,7 +1049,9 @@ protected void UpdateMusic() this.newMusic = 1; else if (!Game1.dayTime) this.newMusic = !Game1.bloodMoon ? 3 : 2; - this.curMusic = this.newMusic; + + this.curMusic = this.newMusic; + for (int index = 1; index < 6; ++index) { if (index == this.curMusic) @@ -1175,8 +1218,10 @@ protected override void Update(GameTime gameTime) } else this.toggleFullscreen = true; + Game1.oldMouseState = Game1.mouseState; - Game1.mouseState = Mouse.GetState(); + Game1.mouseState = TouchPanel.GetState();//Mouse.GetState(); + Game1.keyState = Keyboard.GetState(); if (Game1.editSign) Game1.chatMode = false; @@ -1529,9 +1574,10 @@ public static string GetInputText(string oldString) protected void MouseText(string cursorText, int rare = 0) { - int x1 = Game1.mouseState.X + 10; - int y1 = Game1.mouseState.Y + 10; - Color color1 = new Color((int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor); + int x1 = (int)Game1.mouseState[0].Position.X + 10; + int y1 = (int)Game1.mouseState[0].Position.Y + 10; + Color color1 = new Color((int) Game1.mouseTextColor, + (int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor); if (Game1.toolTip.type > 0) { rare = Game1.toolTip.rare; @@ -2776,7 +2822,12 @@ protected void DrawChat() int num10 = 180; int num11 = 130 + num3 * 30; float scale1 = 0.9f; - if (Game1.mouseState.X > num10 && (double) Game1.mouseState.X < (double) num10 + (double) Game1.fontMouseText.MeasureString(text).X && Game1.mouseState.Y > num11 && (double) Game1.mouseState.Y < (double) num11 + (double) Game1.fontMouseText.MeasureString(text).Y) + + if (Game1.mouseState[0].Position.X > num10 && (double) Game1.mouseState[0].Position.X + < (double) num10 + (double) Game1.fontMouseText.MeasureString(text).X + && Game1.mouseState[0].Position.Y > num11 + && (double) Game1.mouseState[0].Position.Y < (double) num11 + + (double) Game1.fontMouseText.MeasureString(text).Y) { Game1.player[Game1.myPlayer].mouseInterface = true; scale1 = 1.1f; @@ -2791,6 +2842,7 @@ protected void DrawChat() Game1.PlaySound(12); Game1.npcChatFocus2 = false; } + Vector2 origin; for (int index5 = 0; index5 < 5; ++index5) { @@ -2815,7 +2867,12 @@ protected void DrawChat() int num14 = num10 + (int) Game1.fontMouseText.MeasureString(text).X + 20; int num15 = 130 + num3 * 30; float scale2 = 0.9f; - if (Game1.mouseState.X > num14 && (double) Game1.mouseState.X < (double) num14 + (double) Game1.fontMouseText.MeasureString("Close").X && Game1.mouseState.Y > num15 && (double) Game1.mouseState.Y < (double) num15 + (double) Game1.fontMouseText.MeasureString("Close").Y) + if (Game1.mouseState[0].Position.X > num14 + && (double) Game1.mouseState[0].Position.X + < (double) num14 + (double) Game1.fontMouseText.MeasureString("Close").X + && Game1.mouseState[0].Position.Y > num15 + && (double) Game1.mouseState[0].Position.Y < (double) num15 + + (double) Game1.fontMouseText.MeasureString("Close").Y) { scale2 = 1.1f; if (!Game1.npcChatFocus1) @@ -2846,9 +2903,12 @@ protected void DrawChat() color5 = color2; origin = Game1.fontMouseText.MeasureString("Close"); origin *= 0.5f; - this.spriteBatch.DrawString(Game1.fontMouseText, "Close", new Vector2((float) num16 + origin.X, (float) num17 + origin.Y), color5, 0.0f, origin, scale2, SpriteEffects.None, 0.0f); + this.spriteBatch.DrawString(Game1.fontMouseText, + "Close", new Vector2((float) num16 + origin.X, (float) num17 + origin.Y), + color5, 0.0f, origin, scale2, SpriteEffects.None, 0.0f); } - if (Game1.mouseState.LeftButton != ButtonState.Pressed || !Game1.mouseLeftRelease) + if (/*Game1.mouseState.LeftButton != ButtonState.Pressed */ + Game1.mouseState.Count == 0 || !Game1.mouseLeftRelease) return; Game1.mouseLeftRelease = false; Game1.player[Game1.myPlayer].releaseUseItem = false; @@ -3145,10 +3205,14 @@ protected void DrawInterface() this.spriteBatch.Draw(Game1.itemTexture[4], new Vector2((float) (num27 - 16), (float) (y + 14)), new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[4].Width, Game1.itemTexture[4].Height)), Game1.teamColor[Game1.player[Game1.myPlayer].team], -0.785f, new Vector2(), 1f, SpriteEffects.None, 0.0f); this.spriteBatch.Draw(Game1.itemTexture[4], new Vector2((float) (num27 + 2), (float) (y + 14)), new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[4].Width, Game1.itemTexture[4].Height)), Game1.teamColor[Game1.player[Game1.myPlayer].team], -0.785f, new Vector2(), 1f, SpriteEffects.None, 0.0f); } - if (Game1.mouseState.X > num27 && Game1.mouseState.X < num27 + 34 && Game1.mouseState.Y > y - 2 && Game1.mouseState.Y < y + 34) + if (Game1.mouseState[0].Position.X > num27 + && Game1.mouseState[0].Position.X < num27 + 34 && + Game1.mouseState[0].Position.Y > y - 2 + && Game1.mouseState[0].Position.Y < y + 34) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseState.LeftButton == ButtonState.Pressed && Game1.mouseLeftRelease) + if (Game1.mouseState.Count == 1 //Game1.mouseState.LeftButton == ButtonState.Pressed + && Game1.mouseLeftRelease) { Game1.PlaySound(12); Game1.player[Game1.myPlayer].hostile = !Game1.player[Game1.myPlayer].hostile; @@ -3156,7 +3220,9 @@ protected void DrawInterface() } } int num28 = num27 - 3; - Rectangle rectangle3 = new Rectangle(Game1.mouseState.X, Game1.mouseState.Y, 1, 1); + Rectangle rectangle3 = new Rectangle( + (int)Game1.mouseState[0].Position.X, + (int)Game1.mouseState[0].Position.Y, 1, 1); int width = Game1.teamTexture.Width; int height = Game1.teamTexture.Height; for (int index = 0; index < 5; ++index) @@ -3175,7 +3241,10 @@ protected void DrawInterface() if (rectangle4.Intersects(rectangle3)) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseState.LeftButton == ButtonState.Pressed && Game1.mouseLeftRelease && Game1.player[Game1.myPlayer].team != index) + if ( Game1.mouseState.Count == 1 + //Game1.mouseState.LeftButton == ButtonState.Pressed + && Game1.mouseLeftRelease + && Game1.player[Game1.myPlayer].team != index) { Game1.PlaySound(12); Game1.player[Game1.myPlayer].team = index; @@ -3183,11 +3252,26 @@ protected void DrawInterface() } } } - this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 50), (float) (y - 20)), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, Game1.teamTexture.Height)), Game1.teamColor[0], 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); - this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 40), (float) y), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, Game1.teamTexture.Height)), Game1.teamColor[1], 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); - this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 60), (float) y), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, Game1.teamTexture.Height)), Game1.teamColor[2], 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); - this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 40), (float) (y + 20)), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, Game1.teamTexture.Height)), Game1.teamColor[3], 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); - this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 60), (float) (y + 20)), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, Game1.teamTexture.Height)), Game1.teamColor[4], 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 50), + (float) (y - 20)), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, + Game1.teamTexture.Height)), Game1.teamColor[0], 0.0f, new Vector2(), 1f, + SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 40), + (float) y), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, + Game1.teamTexture.Height)), Game1.teamColor[1], 0.0f, new Vector2(), 1f, + SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 60), + (float) y), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, + Game1.teamTexture.Height)), Game1.teamColor[2], 0.0f, new Vector2(), 1f, + SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 40), + (float) (y + 20)), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, + Game1.teamTexture.Height)), Game1.teamColor[3], 0.0f, new Vector2(), 1f, + SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.teamTexture, new Vector2((float) (num28 + 60), + (float) (y + 20)), new Rectangle?(new Rectangle(0, 0, Game1.teamTexture.Width, + Game1.teamTexture.Height)), Game1.teamColor[4], 0.0f, new Vector2(), 1f, + SpriteEffects.None, 0.0f); } string text3 = "Save & Exit"; if (Game1.netMode != 0) @@ -3219,13 +3303,18 @@ protected void DrawInterface() color2 = Color.White; this.spriteBatch.DrawString(Game1.fontDeathText, text3, new Vector2((float) (num29 + num31), (float) (num30 + num32)), color2, 0.0f, new Vector2(vector2_1.X / 2f, vector2_1.Y / 2f), Game1.exitScale - 0.2f, SpriteEffects.None, 0.0f); } - if ((double) Game1.mouseState.X > (double) num29 - (double) vector2_1.X / 2.0 && (double) Game1.mouseState.X < (double) num29 + (double) vector2_1.X / 2.0 && (double) Game1.mouseState.Y > (double) num30 - (double) vector2_1.Y / 2.0 && (double) Game1.mouseState.Y < (double) num30 + (double) vector2_1.Y / 2.0 - 10.0) + if ((double) Game1.mouseState[0].Position.X > + (double) num29 - (double) vector2_1.X / 2.0 + && (double) Game1.mouseState[0].Position.X < (double) num29 + (double) vector2_1.X / 2.0 + && (double) Game1.mouseState[0].Position.Y > (double) num30 - (double) vector2_1.Y / 2.0 + && (double) Game1.mouseState[0].Position.Y < (double) num30 + (double) vector2_1.Y / 2.0 - 10.0) { if (!Game1.mouseExit) Game1.PlaySound(12); Game1.mouseExit = true; Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease && //Game1.mouseState.LeftButton == ButtonState.Pressed + Game1.mouseState.Count == 1) { Game1.menuMode = 10; WorldGen.SaveAndQuit(); @@ -3244,10 +3333,17 @@ protected void DrawInterface() int y = (int) (20.0 + (double) (index2 * 56) * (double) Game1.inventoryScale); int index3 = index1 + index2 * 10; color3 = new Color(100, 100, 100, 100); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + if (Game1.mouseState[0].Position.X >= x && + (double) Game1.mouseState[0].Position.X <= (double) x + + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale + && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease + && Game1.mouseState.Count == 1/*Game1.mouseState.LeftButton == ButtonState.Pressed*/) { if (Game1.player[Game1.myPlayer].selectedItem != index3 || Game1.player[Game1.myPlayer].itemAnimation <= 0) { @@ -3279,7 +3375,11 @@ protected void DrawInterface() } } } - else if (Game1.stackSplit <= 1 && Game1.mouseState.RightButton == ButtonState.Pressed && (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].inventory[index3]) || Game1.mouseItem.type == 0) && (Game1.mouseItem.stack < Game1.mouseItem.maxStack || Game1.mouseItem.type == 0)) + else if (Game1.stackSplit <= 1 + && Game1.mouseState.Count > 1//Game1.mouseState.RightButton == ButtonState.Pressed + && (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].inventory[index3]) + || Game1.mouseItem.type == 0) + && (Game1.mouseItem.stack < Game1.mouseItem.maxStack || Game1.mouseItem.type == 0)) { if (Game1.mouseItem.type == 0) { @@ -3332,11 +3432,26 @@ protected void DrawInterface() else if (index == 3) text4 = "Accessories"; Vector2 vector2_2 = Game1.fontMouseText.MeasureString(text4); - this.spriteBatch.DrawString(Game1.fontMouseText, text4, new Vector2((float) ((double) x - (double) vector2_2.X - 10.0), (float) ((double) y + (double) Game1.inventoryBackTexture.Height * 0.5 - (double) vector2_2.Y * 0.5)), new Color((int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + this.spriteBatch.DrawString(Game1.fontMouseText, text4, new Vector2((float) ((double) x + - (double) vector2_2.X - 10.0), (float) ((double) y + + (double) Game1.inventoryBackTexture.Height * 0.5 + - (double) vector2_2.Y * 0.5)), new Color((int) Game1.mouseTextColor, + (int) Game1.mouseTextColor, (int) Game1.mouseTextColor, + (int) Game1.mouseTextColor), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Game1.mouseState[0].Position.X >= x && (double) Game1.mouseState[0].Position.X <= (double) x + + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + (double) Game1.inventoryBackTexture.Height + * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed && (Game1.mouseItem.type == 0 || Game1.mouseItem.headSlot > -1 && index == 0 || Game1.mouseItem.bodySlot > -1 && index == 1 || Game1.mouseItem.legSlot > -1 && index == 2 || Game1.mouseItem.accessory && index > 2)) + if (Game1.mouseLeftRelease + && Game1.mouseState.Count == 1//Game1.mouseState.LeftButton == ButtonState.Pressed + && (Game1.mouseItem.type == 0 + || Game1.mouseItem.headSlot > -1 && index == 0 + || Game1.mouseItem.bodySlot > -1 && index == 1 + || Game1.mouseItem.legSlot > -1 && index == 2 + || Game1.mouseItem.accessory && index > 2)) { Item mouseItem = Game1.mouseItem; Game1.mouseItem = Game1.player[Game1.myPlayer].armor[index]; @@ -3391,23 +3506,33 @@ protected void DrawInterface() Game1.PlaySound(12); Game1.availableRecipeY[index] -= 6.5f; } - if (index < Game1.numAvailableRecipes && (double) Math.Abs(Game1.availableRecipeY[index]) <= 250.0) + if (index < Game1.numAvailableRecipes + && (double) Math.Abs(Game1.availableRecipeY[index]) <= 250.0) { int x = (int) (46.0 - 26.0 * (double) Game1.inventoryScale); - int y = (int) (410.0 + (double) Game1.availableRecipeY[index] * (double) Game1.inventoryScale - 30.0 * (double) Game1.inventoryScale); + int y = (int) (410.0 + (double) Game1.availableRecipeY[index] + * (double) Game1.inventoryScale - 30.0 * (double) Game1.inventoryScale); double num36 = (double) ((int) color1.A + 50); double num37 = (double) byte.MaxValue; if ((double) Math.Abs(Game1.availableRecipeY[index]) > 150.0) { num36 = 150.0 * (100.0 - ((double) Math.Abs(Game1.availableRecipeY[index]) - 150.0)) * 0.01; - num37 = (double) byte.MaxValue * (100.0 - ((double) Math.Abs(Game1.availableRecipeY[index]) - 150.0)) * 0.01; - } - color3 = new Color((int) (byte) num36, (int) (byte) num36, (int) (byte) num36, (int) (byte) num36); - Color newColor = new Color((int) (byte) num37, (int) (byte) num37, (int) (byte) num37, (int) (byte) num37); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + num37 = (double) byte.MaxValue * (100.0 - ((double) + Math.Abs(Game1.availableRecipeY[index]) - 150.0)) * 0.01; + } + color3 = new Color((int) (byte) num36, (int) (byte) num36, + (int) (byte) num36, (int) (byte) num36); + Color newColor = new Color((int) (byte) num37, (int) (byte) num37, + (int) (byte) num37, (int) (byte) num37); + if (Game1.mouseState[0].Position.X >= x && (double) Game1.mouseState[0].Position.X <= (double) x + + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease && + Game1.mouseState.Count == 1/*Game1.mouseState.LeftButton == ButtonState.Pressed*/) { if (Game1.focusRecipe == index) { @@ -3476,7 +3601,11 @@ protected void DrawInterface() Game1.inventoryScale = 0.6f; if (num41 != 0.0) { - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + if (Game1.mouseState[0].Position.X >= x + && (double) Game1.mouseState[0].Position.X <= (double) x + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale && (double) Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; cursorText1 = Game1.recipe[Game1.availableRecipe[Game1.focusRecipe]].requiredItem[index].name; @@ -3513,28 +3642,44 @@ protected void DrawInterface() int y = (int) (85.0 + (double) (index4 * 56) * (double) Game1.inventoryScale); int index5 = index4 + 40; color3 = new Color(100, 100, 100, 100); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + if (Game1.mouseState[0].Position.X >= x + && (double) Game1.mouseState[0].Position.X + <= (double) x + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale + && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) - { - if ((Game1.player[Game1.myPlayer].selectedItem != index5 || Game1.player[Game1.myPlayer].itemAnimation <= 0) && (Game1.mouseItem.type == 0 || Game1.mouseItem.type == 71 || Game1.mouseItem.type == 72 || Game1.mouseItem.type == 73 || Game1.mouseItem.type == 74)) + if (Game1.mouseLeftRelease + && Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) + { + if ((Game1.player[Game1.myPlayer].selectedItem != index5 + || Game1.player[Game1.myPlayer].itemAnimation <= 0) + && (Game1.mouseItem.type == 0 || Game1.mouseItem.type == 71 + || Game1.mouseItem.type == 72 || Game1.mouseItem.type == 73 + || Game1.mouseItem.type == 74)) { Item mouseItem = Game1.mouseItem; Game1.mouseItem = Game1.player[Game1.myPlayer].inventory[index5]; Game1.player[Game1.myPlayer].inventory[index5] = mouseItem; - if (Game1.player[Game1.myPlayer].inventory[index5].type == 0 || Game1.player[Game1.myPlayer].inventory[index5].stack < 1) + if (Game1.player[Game1.myPlayer].inventory[index5].type == 0 + || Game1.player[Game1.myPlayer].inventory[index5].stack < 1) Game1.player[Game1.myPlayer].inventory[index5] = new Item(); - if (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].inventory[index5]) && Game1.player[Game1.myPlayer].inventory[index5].stack != Game1.player[Game1.myPlayer].inventory[index5].maxStack && Game1.mouseItem.stack != Game1.mouseItem.maxStack) + if (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].inventory[index5]) + && Game1.player[Game1.myPlayer].inventory[index5].stack != Game1.player[Game1.myPlayer].inventory[index5].maxStack && Game1.mouseItem.stack != Game1.mouseItem.maxStack) { - if (Game1.mouseItem.stack + Game1.player[Game1.myPlayer].inventory[index5].stack <= Game1.mouseItem.maxStack) + if (Game1.mouseItem.stack + Game1.player[Game1.myPlayer].inventory[index5].stack + <= Game1.mouseItem.maxStack) { Game1.player[Game1.myPlayer].inventory[index5].stack += Game1.mouseItem.stack; Game1.mouseItem.stack = 0; } else { - int num45 = Game1.mouseItem.maxStack - Game1.player[Game1.myPlayer].inventory[index5].stack; + int num45 = Game1.mouseItem.maxStack + - Game1.player[Game1.myPlayer].inventory[index5].stack; Game1.player[Game1.myPlayer].inventory[index5].stack += num45; Game1.mouseItem.stack -= num45; } @@ -3545,7 +3690,12 @@ protected void DrawInterface() Game1.PlaySound(7); } } - else if (Game1.stackSplit <= 1 && Game1.mouseState.RightButton == ButtonState.Pressed && (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].inventory[index5]) || Game1.mouseItem.type == 0) && (Game1.mouseItem.stack < Game1.mouseItem.maxStack || Game1.mouseItem.type == 0)) + else if (Game1.stackSplit <= 1 + && Game1.mouseState.Count > 1//Game1.mouseState.RightButton == ButtonState.Pressed + && (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].inventory[index5]) + || Game1.mouseItem.type == 0) + && (Game1.mouseItem.stack < Game1.mouseItem.maxStack + || Game1.mouseItem.type == 0)) { if (Game1.mouseItem.type == 0) { @@ -3596,10 +3746,17 @@ protected void DrawInterface() int y = (int) (210.0 + (double) (index7 * 56) * (double) Game1.inventoryScale); int index8 = index6 + index7 * 5; color3 = new Color(100, 100, 100, 100); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + if (Game1.mouseState[0].Position.X >= x + && (double) Game1.mouseState[0].Position.X <= (double) x + + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale + && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease && Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) { if (Game1.mouseItem.type == 0) { @@ -3622,7 +3779,13 @@ protected void DrawInterface() Game1.PlaySound(7); } } - else if (Game1.stackSplit <= 1 && Game1.mouseState.RightButton == ButtonState.Pressed && (Game1.mouseItem.IsTheSameAs(this.shop[Game1.npcShop].item[index8]) || Game1.mouseItem.type == 0) && (Game1.mouseItem.stack < Game1.mouseItem.maxStack || Game1.mouseItem.type == 0) && Game1.player[Game1.myPlayer].BuyItem(this.shop[Game1.npcShop].item[index8].value)) + else if (Game1.stackSplit <= 1 + && Game1.mouseState.Count > 1//Game1.mouseState.RightButton == ButtonState.Pressed + && (Game1.mouseItem.IsTheSameAs(this.shop[Game1.npcShop].item[index8]) + || Game1.mouseItem.type == 0) + && (Game1.mouseItem.stack < Game1.mouseItem.maxStack + || Game1.mouseItem.type == 0) + && Game1.player[Game1.myPlayer].BuyItem(this.shop[Game1.npcShop].item[index8].value)) { Game1.PlaySound(18); if (Game1.mouseItem.type == 0) @@ -3668,10 +3831,18 @@ protected void DrawInterface() int y = (int) (210.0 + (double) (index10 * 56) * (double) Game1.inventoryScale); int number2 = index9 + index10 * 5; color3 = new Color(100, 100, 100, 100); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + if (Game1.mouseState[0].Position.X >= x + && (double) Game1.mouseState[0].Position.X <= (double) x + + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale + && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height + * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease && Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) { if (Game1.player[Game1.myPlayer].selectedItem != number2 || Game1.player[Game1.myPlayer].itemAnimation <= 0) { @@ -3705,7 +3876,11 @@ protected void DrawInterface() NetMessage.SendData(32, number: Game1.player[Game1.myPlayer].chest, number2: (float) number2); } } - else if (Game1.stackSplit <= 1 && Game1.mouseState.RightButton == ButtonState.Pressed && (Game1.mouseItem.IsTheSameAs(Game1.chest[Game1.player[Game1.myPlayer].chest].item[number2]) || Game1.mouseItem.type == 0) && (Game1.mouseItem.stack < Game1.mouseItem.maxStack || Game1.mouseItem.type == 0)) + else if (Game1.stackSplit <= 1 + && Game1.mouseState.Count > 1//Game1.mouseState.RightButton == ButtonState.Pressed + && (Game1.mouseItem.IsTheSameAs(Game1.chest[Game1.player[Game1.myPlayer].chest].item[number2]) + || Game1.mouseItem.type == 0) && (Game1.mouseItem.stack < Game1.mouseItem.maxStack + || Game1.mouseItem.type == 0)) { if (Game1.mouseItem.type == 0) { @@ -3758,10 +3933,18 @@ protected void DrawInterface() int y = (int) (210.0 + (double) (index12 * 56) * (double) Game1.inventoryScale); int index13 = index11 + index12 * 5; color3 = new Color(100, 100, 100, 100); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.inventoryScale && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.inventoryScale) + if (Game1.mouseState[0].Position.X >= x + && (double) Game1.mouseState[0].Position.X + <= (double) x + (double) Game1.inventoryBackTexture.Width + * (double) Game1.inventoryScale + && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= + (double) y + (double) Game1.inventoryBackTexture.Height + * (double) Game1.inventoryScale) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease && Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) { if (Game1.player[Game1.myPlayer].selectedItem != index13 || Game1.player[Game1.myPlayer].itemAnimation <= 0) { @@ -3793,7 +3976,13 @@ protected void DrawInterface() } } } - else if (Game1.stackSplit <= 1 && Game1.mouseState.RightButton == ButtonState.Pressed && (Game1.mouseItem.IsTheSameAs(Game1.player[Game1.myPlayer].bank[index13]) || Game1.mouseItem.type == 0) && (Game1.mouseItem.stack < Game1.mouseItem.maxStack || Game1.mouseItem.type == 0)) + else if (Game1.stackSplit <= 1 + && Game1.mouseState.Count > 1//Game1.mouseState.RightButton == ButtonState.Pressed + && (Game1.mouseItem.IsTheSameAs( + Game1.player[Game1.myPlayer].bank[index13]) + || Game1.mouseItem.type == 0) + && (Game1.mouseItem.stack < Game1.mouseItem.maxStack + || Game1.mouseItem.type == 0)) { if (Game1.mouseItem.type == 0) { @@ -3911,8 +4100,12 @@ protected void DrawInterface() } if (!Game1.playerInventory) { - this.spriteBatch.DrawString(Game1.fontMouseText, "Items", new Vector2(215f, 0.0f), new Color((int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + this.spriteBatch.DrawString(Game1.fontMouseText, "Items", new Vector2(215f, 0.0f), + new Color((int) Game1.mouseTextColor, (int) Game1.mouseTextColor, + (int) Game1.mouseTextColor, (int) Game1.mouseTextColor), 0.0f, new Vector2(), + 1f, SpriteEffects.None, 0.0f); int x = 20; + for (int index = 0; index < 10; ++index) { if (index == Game1.player[Game1.myPlayer].selectedItem) @@ -3922,13 +4115,28 @@ protected void DrawInterface() } else if ((double) Game1.hotbarScale[index] > 0.75) Game1.hotbarScale[index] -= 0.05f; + int y = (int) (20.0 + 22.0 * (1.0 - (double) Game1.hotbarScale[index])); - Color color5 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) (75.0 + 150.0 * (double) Game1.hotbarScale[index])); - this.spriteBatch.Draw(Game1.inventoryBackTexture, new Vector2((float) x, (float) y), new Rectangle?(new Rectangle(0, 0, Game1.inventoryBackTexture.Width, Game1.inventoryBackTexture.Height)), new Color(100, 100, 100, 100), 0.0f, new Vector2(), Game1.hotbarScale[index], SpriteEffects.None, 0.0f); - if (Game1.mouseState.X >= x && (double) Game1.mouseState.X <= (double) x + (double) Game1.inventoryBackTexture.Width * (double) Game1.hotbarScale[index] && Game1.mouseState.Y >= y && (double) Game1.mouseState.Y <= (double) y + (double) Game1.inventoryBackTexture.Height * (double) Game1.hotbarScale[index] && !Game1.player[Game1.myPlayer].channel) + + Color color5 = new Color((int) byte.MaxValue, (int) byte.MaxValue, + (int) byte.MaxValue, (int) (75.0 + 150.0 * (double) Game1.hotbarScale[index])); + + this.spriteBatch.Draw(Game1.inventoryBackTexture, new Vector2((float) x, (float) y), + new Rectangle?(new Rectangle(0, 0, Game1.inventoryBackTexture.Width, + Game1.inventoryBackTexture.Height)), new Color(100, 100, 100, 100), + 0.0f, new Vector2(), Game1.hotbarScale[index], SpriteEffects.None, 0.0f); + if (Game1.mouseState[0].Position.X >= x + && (double) Game1.mouseState[0].Position.X <= (double) x + + (double) Game1.inventoryBackTexture.Width + * (double) Game1.hotbarScale[index] + && Game1.mouseState[0].Position.Y >= y + && (double) Game1.mouseState[0].Position.Y <= (double) y + + (double) Game1.inventoryBackTexture.Height + * (double) Game1.hotbarScale[index] && !Game1.player[Game1.myPlayer].channel) { Game1.player[Game1.myPlayer].mouseInterface = true; - if (Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) Game1.player[Game1.myPlayer].changeItem = index; Game1.player[Game1.myPlayer].showItemIcon = false; cursorText1 = Game1.player[Game1.myPlayer].inventory[index].name; @@ -4006,36 +4214,90 @@ protected void DrawInterface() if (index17 == 3) num64 = 2; if (index17 == 4) - color7 = new Color((int) (byte) ((double) Game1.chatLine[index16].color.R * (double) num62), (int) (byte) ((double) Game1.chatLine[index16].color.G * (double) num62), (int) (byte) ((double) Game1.chatLine[index16].color.B * (double) num62), (int) Game1.mouseTextColor); - this.spriteBatch.DrawString(Game1.fontMouseText, Game1.chatLine[index16].text, new Vector2((float) (88 + num63), (float) (Game1.screenHeight - 30 + num64 - 28 - index16 * 21)), color7, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + color7 = + new Color((int) (byte) ((double) Game1.chatLine[index16].color.R + * (double) num62), + (int) (byte) ((double) Game1.chatLine[index16].color.G + * (double) num62), + (int) (byte) ((double) Game1.chatLine[index16].color.B + * (double) num62), + (int) Game1.mouseTextColor); + + this.spriteBatch.DrawString(Game1.fontMouseText, + Game1.chatLine[index16].text, new Vector2((float) (88 + num63), (float) (Game1.screenHeight - 30 + num64 - 28 - index16 * 21)), color7, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); } } } if (Game1.player[Game1.myPlayer].dead) { string text = Game1.player[Game1.myPlayer].name + " was slain..."; - this.spriteBatch.DrawString(Game1.fontDeathText, text, new Vector2((float) (Game1.screenWidth / 2 - text.Length * 10), (float) (Game1.screenHeight / 2 - 20)), Game1.player[Game1.myPlayer].GetDeathAlpha(new Color(0, 0, 0, 0)), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + this.spriteBatch.DrawString(Game1.fontDeathText, text, + new Vector2((float) (Game1.screenWidth / 2 - text.Length * 10), + (float) (Game1.screenHeight / 2 - 20)), + Game1.player[Game1.myPlayer].GetDeathAlpha(new Color(0, 0, 0, 0)), + 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); } - this.spriteBatch.Draw(Game1.cursorTexture, new Vector2((float) (Game1.mouseState.X + 1), (float) (Game1.mouseState.Y + 1)), new Rectangle?(new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), new Color((int) ((double) Game1.cursorColor.R * 0.20000000298023224), (int) ((double) Game1.cursorColor.G * 0.20000000298023224), (int) ((double) Game1.cursorColor.B * 0.20000000298023224), (int) ((double) Game1.cursorColor.A * 0.5)), 0.0f, new Vector2(), Game1.cursorScale * 1.1f, SpriteEffects.None, 0.0f); - this.spriteBatch.Draw(Game1.cursorTexture, new Vector2((float) Game1.mouseState.X, (float) Game1.mouseState.Y), new Rectangle?(new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), Game1.cursorColor, 0.0f, new Vector2(), Game1.cursorScale, SpriteEffects.None, 0.0f); + + this.spriteBatch.Draw(Game1.cursorTexture, new Vector2((float) ( + Game1.mouseState[0].Position.X + 1), + (float) (Game1.mouseState[0].Position.Y + 1)), + new Rectangle?(new Rectangle(0, 0, Game1.cursorTexture.Width, + Game1.cursorTexture.Height)), + new Color((int) ((double) Game1.cursorColor.R * 0.20000000298023224), + (int) ((double) Game1.cursorColor.G * 0.20000000298023224), + (int) ((double) Game1.cursorColor.B * 0.20000000298023224), + (int) ((double) Game1.cursorColor.A * 0.5)), 0.0f, + new Vector2(), Game1.cursorScale * 1.1f, SpriteEffects.None, 0.0f); + + this.spriteBatch.Draw(Game1.cursorTexture, + new Vector2((float) Game1.mouseState[0].Position.X, + (float) Game1.mouseState[0].Position.Y), + new Rectangle?(new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), + Game1.cursorColor, 0.0f, new Vector2(), Game1.cursorScale, SpriteEffects.None, 0.0f); if (Game1.mouseItem.type > 0 && Game1.mouseItem.stack > 0) { Game1.player[Game1.myPlayer].showItemIcon = false; Game1.player[Game1.myPlayer].showItemIcon2 = 0; flag1 = true; float num65 = 1f; - if (Game1.itemTexture[Game1.mouseItem.type].Width > 32 || Game1.itemTexture[Game1.mouseItem.type].Height > 32) - num65 = Game1.itemTexture[Game1.mouseItem.type].Width <= Game1.itemTexture[Game1.mouseItem.type].Height ? 32f / (float) Game1.itemTexture[Game1.mouseItem.type].Height : 32f / (float) Game1.itemTexture[Game1.mouseItem.type].Width; + if (Game1.itemTexture[Game1.mouseItem.type].Width > 32 || + Game1.itemTexture[Game1.mouseItem.type].Height > 32) + num65 = Game1.itemTexture[Game1.mouseItem.type].Width <= + Game1.itemTexture[Game1.mouseItem.type].Height + ? 32f / (float) Game1.itemTexture[Game1.mouseItem.type].Height : 32f + / (float) Game1.itemTexture[Game1.mouseItem.type].Width; float num66 = 1f; Color white = Color.White; float scale = num65 * num66; - this.spriteBatch.Draw(Game1.itemTexture[Game1.mouseItem.type], new Vector2((float) ((double) Game1.mouseState.X + 26.0 * (double) num66 - (double) Game1.itemTexture[Game1.mouseItem.type].Width * 0.5 * (double) scale), (float) ((double) Game1.mouseState.Y + 26.0 * (double) num66 - (double) Game1.itemTexture[Game1.mouseItem.type].Height * 0.5 * (double) scale)), new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[Game1.mouseItem.type].Width, Game1.itemTexture[Game1.mouseItem.type].Height)), Game1.mouseItem.GetAlpha(white), 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + + this.spriteBatch.Draw(Game1.itemTexture[Game1.mouseItem.type], + new Vector2((float) ((double) Game1.mouseState[0].Position.X + 26.0 * (double) num66 - + (double) Game1.itemTexture[Game1.mouseItem.type].Width * 0.5 * (double) scale), + (float) ((double) Game1.mouseState[0].Position.Y + 26.0 * (double) num66 - + (double) Game1.itemTexture[Game1.mouseItem.type].Height * 0.5 * (double) scale)), + new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[Game1.mouseItem.type].Width, + Game1.itemTexture[Game1.mouseItem.type].Height)), Game1.mouseItem.GetAlpha(white), 0.0f, + new Vector2(), scale, SpriteEffects.None, 0.0f); + if (Game1.mouseItem.color != new Color()) - this.spriteBatch.Draw(Game1.itemTexture[Game1.mouseItem.type], new Vector2((float) ((double) Game1.mouseState.X + 26.0 * (double) num66 - (double) Game1.itemTexture[Game1.mouseItem.type].Width * 0.5 * (double) scale), (float) ((double) Game1.mouseState.Y + 26.0 * (double) num66 - (double) Game1.itemTexture[Game1.mouseItem.type].Height * 0.5 * (double) scale)), new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[Game1.mouseItem.type].Width, Game1.itemTexture[Game1.mouseItem.type].Height)), Game1.mouseItem.GetColor(white), 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.itemTexture[Game1.mouseItem.type], new Vector2((float) ( + (double) Game1.mouseState[0].Position.X + 26.0 * (double) num66 - + (double) Game1.itemTexture[Game1.mouseItem.type].Width * 0.5 * (double) scale), + (float) ((double) Game1.mouseState[0].Position.Y + 26.0 * (double) num66 - + (double) Game1.itemTexture[Game1.mouseItem.type].Height * 0.5 * (double) scale)), + new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[Game1.mouseItem.type].Width, + Game1.itemTexture[Game1.mouseItem.type].Height)), Game1.mouseItem.GetColor(white), 0.0f, + new Vector2(), scale, SpriteEffects.None, 0.0f); + if (Game1.mouseItem.stack > 1) - this.spriteBatch.DrawString(Game1.fontItemStack, string.Concat((object) Game1.mouseItem.stack), new Vector2((float) Game1.mouseState.X + 10f * num66, (float) Game1.mouseState.Y + 26f * num66), white, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + this.spriteBatch.DrawString(Game1.fontItemStack, string.Concat((object) Game1.mouseItem.stack), + new Vector2((float) Game1.mouseState[0].Position.X + 10f * num66, + (float) Game1.mouseState[0].Position.Y + 26f * num66), + white, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); } - Rectangle rectangle5 = new Rectangle((int) ((double) Game1.mouseState.X + (double) Game1.screenPosition.X), (int) ((double) Game1.mouseState.Y + (double) Game1.screenPosition.Y), 1, 1); + Rectangle rectangle5 = new Rectangle((int) ((double) Game1.mouseState[0].Position.X + + (double) Game1.screenPosition.X), (int) ((double) Game1.mouseState[0].Position.Y + + (double) Game1.screenPosition.Y), 1, 1); if (!flag1) { int num67 = 26 * Game1.player[Game1.myPlayer].statLifeMax / num11; @@ -4045,10 +4307,14 @@ protected void DrawInterface() num67 = 260; num68 += 26; } - if (Game1.mouseState.X > 500 && Game1.mouseState.X < 500 + num67 && Game1.mouseState.Y > 32 && Game1.mouseState.Y < 32 + Game1.heartTexture.Height + num68) + if (Game1.mouseState[0].Position.X > 500 + && Game1.mouseState[0].Position.X < 500 + num67 + && Game1.mouseState[0].Position.Y > 32 + && Game1.mouseState[0].Position.Y < 32 + Game1.heartTexture.Height + num68) { Game1.player[Game1.myPlayer].showItemIcon = false; - this.MouseText(Game1.player[Game1.myPlayer].statLife.ToString() + "/" + (object) Game1.player[Game1.myPlayer].statLifeMax); + this.MouseText(Game1.player[Game1.myPlayer].statLife.ToString() + + "/" + (object) Game1.player[Game1.myPlayer].statLifeMax); flag1 = true; } } @@ -4056,10 +4322,15 @@ protected void DrawInterface() { int num69 = 24; int num70 = 28 * Game1.player[Game1.myPlayer].statManaMax / num16; - if (Game1.mouseState.X > 762 && Game1.mouseState.X < 762 + num69 && Game1.mouseState.Y > 30 && Game1.mouseState.Y < 30 + num70) + + if (Game1.mouseState[0].Position.X > 762 + && Game1.mouseState[0].Position.X < 762 + + num69 && Game1.mouseState[0].Position.Y > 30 + && Game1.mouseState[0].Position.Y < 30 + num70) { Game1.player[Game1.myPlayer].showItemIcon = false; - this.MouseText(Game1.player[Game1.myPlayer].statMana.ToString() + "/" + (object) Game1.player[Game1.myPlayer].statManaMax); + this.MouseText(Game1.player[Game1.myPlayer].statMana.ToString() + + "/" + (object) Game1.player[Game1.myPlayer].statManaMax); flag1 = true; } } @@ -4069,7 +4340,16 @@ protected void DrawInterface() { if (Game1.item[index].active) { - Rectangle rectangle6 = new Rectangle((int) ((double) Game1.item[index].position.X + (double) Game1.item[index].width * 0.5 - (double) Game1.itemTexture[Game1.item[index].type].Width * 0.5), (int) ((double) Game1.item[index].position.Y + (double) Game1.item[index].height - (double) Game1.itemTexture[Game1.item[index].type].Height), Game1.itemTexture[Game1.item[index].type].Width, Game1.itemTexture[Game1.item[index].type].Height); + Rectangle rectangle6 = new Rectangle((int) ( + (double) Game1.item[index].position.X + + (double) Game1.item[index].width * 0.5 + - (double) Game1.itemTexture[Game1.item[index].type].Width * 0.5), + (int) ((double) Game1.item[index].position.Y + + (double) Game1.item[index].height - + (double) Game1.itemTexture[Game1.item[index].type].Height), + Game1.itemTexture[Game1.item[index].type].Width, + Game1.itemTexture[Game1.item[index].type].Height); + if (rectangle5.Intersects(rectangle6)) { Game1.player[Game1.myPlayer].showItemIcon = false; @@ -4122,8 +4402,18 @@ protected void DrawInterface() effects = SpriteEffects.FlipHorizontally; num71 = Game1.npc[index].width / 2 + 8; } - this.spriteBatch.Draw(Game1.chatTexture, new Vector2(Game1.npc[index].position.X + (float) (Game1.npc[index].width / 2) - Game1.screenPosition.X - (float) (Game1.chatTexture.Width / 2) - (float) num71, Game1.npc[index].position.Y - (float) Game1.chatTexture.Height - Game1.screenPosition.Y), new Rectangle?(new Rectangle(0, 0, Game1.chatTexture.Width, Game1.chatTexture.Height)), new Color((int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor, (int) Game1.mouseTextColor), 0.0f, new Vector2(), 1f, effects, 0.0f); - if (Game1.mouseState.RightButton == ButtonState.Pressed && Game1.npcChatRelease) + this.spriteBatch.Draw(Game1.chatTexture, + new Vector2(Game1.npc[index].position.X + (float) (Game1.npc[index].width / 2) + - Game1.screenPosition.X - (float) (Game1.chatTexture.Width / 2) + - (float) num71, Game1.npc[index].position.Y - + (float) Game1.chatTexture.Height - Game1.screenPosition.Y), + new Rectangle?(new Rectangle(0, 0, Game1.chatTexture.Width, Game1.chatTexture.Height)), + new Color((int) Game1.mouseTextColor, (int) Game1.mouseTextColor, + (int) Game1.mouseTextColor, (int) Game1.mouseTextColor), 0.0f, + new Vector2(), 1f, effects, 0.0f); + + if (Game1.mouseState.Count > 1 //Game1.mouseState.RightButton == ButtonState.Pressed + && Game1.npcChatRelease) { Game1.npcChatRelease = false; if (Game1.player[Game1.myPlayer].talkNPC != index) @@ -4145,8 +4435,12 @@ protected void DrawInterface() } } } - Game1.npcChatRelease = Game1.mouseState.RightButton != ButtonState.Pressed; - if (Game1.player[Game1.myPlayer].showItemIcon && (Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type > 0 || Game1.player[Game1.myPlayer].showItemIcon2 > 0)) + + Game1.npcChatRelease = (Game1.mouseState.Count < 2);//Game1.mouseState.RightButton != ButtonState.Pressed; + + if (Game1.player[Game1.myPlayer].showItemIcon + && (Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type > 0 + || Game1.player[Game1.myPlayer].showItemIcon2 > 0)) { int index = Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type; Color color8 = Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].GetAlpha(Color.White); @@ -4157,9 +4451,18 @@ protected void DrawInterface() color8 = Color.White; color9 = new Color(); } - this.spriteBatch.Draw(Game1.itemTexture[index], new Vector2((float) (Game1.mouseState.X + 10), (float) (Game1.mouseState.Y + 10)), new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[index].Width, Game1.itemTexture[index].Height)), color8, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.itemTexture[index], + new Vector2((float) (Game1.mouseState[0].Position.X + 10), + (float) (Game1.mouseState[0].Position.Y + 10)), + new Rectangle?( + new Rectangle(0, 0, Game1.itemTexture[index].Width, Game1.itemTexture[index].Height)), + color8, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); if (Game1.player[Game1.myPlayer].showItemIcon2 == 0 && Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].color != new Color()) - this.spriteBatch.Draw(Game1.itemTexture[Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type], new Vector2((float) (Game1.mouseState.X + 10), (float) (Game1.mouseState.Y + 10)), new Rectangle?(new Rectangle(0, 0, Game1.itemTexture[Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type].Width, Game1.itemTexture[Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type].Height)), color9, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.itemTexture[Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type], + new Vector2((float) (Game1.mouseState[0].Position.X + 10), + (float) (Game1.mouseState[0].Position.Y + 10)), + new Rectangle?(new Rectangle(0, 0, + Game1.itemTexture[Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type].Width, Game1.itemTexture[Game1.player[Game1.myPlayer].inventory[Game1.player[Game1.myPlayer].selectedItem].type].Height)), color9, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); } Game1.player[Game1.myPlayer].showItemIcon = false; Game1.player[Game1.myPlayer].showItemIcon2 = 0; @@ -5303,14 +5606,18 @@ protected void DrawMenu() text2 = "+"; Vector2 vector2 = new Vector2(24f, 24f); int a = 142; - if (Game1.mouseState.X > num16 && (double) Game1.mouseState.X < (double) num16 + (double) vector2.X && Game1.mouseState.Y > num14 + 13 && (double) Game1.mouseState.Y < (double) (num14 + 13) + (double) vector2.Y) + if (Game1.mouseState[0].Position.X > num16 + && (double) Game1.mouseState[0].Position.X < (double) num16 + (double) vector2.X + && Game1.mouseState[0].Position.Y > num14 + 13 + && (double) Game1.mouseState[0].Position.Y < (double) (num14 + 13) + (double) vector2.Y) { if (this.focusColor != (index15 + 1) * (index16 + 10)) Game1.PlaySound(12); this.focusColor = (index15 + 1) * (index16 + 10); flag3 = true; a = (int) byte.MaxValue; - if (Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) { if (this.colorDelay <= 1) { @@ -5443,14 +5750,21 @@ protected void DrawMenu() text4 = "+"; Vector2 vector2 = new Vector2(24f, 24f); int a = 142; - if (Game1.mouseState.X > num29 && (double) Game1.mouseState.X < (double) num29 + (double) vector2.X && Game1.mouseState.Y > num27 + 13 && (double) Game1.mouseState.Y < (double) (num27 + 13) + (double) vector2.Y) + if (Game1.mouseState[0].Position.X > num29 + && (double) Game1.mouseState[0].Position.X + < (double) num29 + (double) vector2.X + && Game1.mouseState[0].Position.Y > num27 + 13 + && (double) Game1.mouseState[0].Position.Y + < (double) (num27 + 13) + (double) vector2.Y) { if (this.focusColor != (index20 + 1) * (index21 + 10)) Game1.PlaySound(12); this.focusColor = (index20 + 1) * (index21 + 10); flag4 = true; a = (int) byte.MaxValue; - if (Game1.mouseState.LeftButton == ButtonState.Pressed) + + if (Game1.mouseState.Count == 1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) { if (this.colorDelay <= 1) { @@ -5549,9 +5863,21 @@ protected void DrawMenu() scale *= 0.35f; else if (Game1.netMode == 2) scale *= 0.5f; - this.spriteBatch.DrawString(Game1.fontDeathText, strArray1[index12], new Vector2((float) (num3 + num35 + numArray2[index12]), (float) (num2 + num4 * index12 + num36) + origin.Y + (float) numArray1[index12]), color2, 0.0f, origin, scale, SpriteEffects.None, 0.0f); + this.spriteBatch.DrawString( + Game1.fontDeathText, strArray1[index12], + new Vector2((float) (num3 + num35 + numArray2[index12]), + (float) (num2 + num4 * index12 + num36) + origin.Y + + (float) numArray1[index12]), color2, 0.0f, + origin, scale, SpriteEffects.None, 0.0f); } - if (Game1.mouseState.X > num3 - strArray1[index12].Length * 10 + numArray2[index12] && Game1.mouseState.X < num3 + strArray1[index12].Length * 10 + numArray2[index12] && Game1.mouseState.Y > num2 + num4 * index12 + numArray1[index12] && Game1.mouseState.Y < num2 + num4 * index12 + 50 + numArray1[index12] && Game1.hasFocus) + + if (Game1.mouseState[0].Position.X > num3 - strArray1[index12].Length * 10 + numArray2[index12] + && Game1.mouseState[0].Position.X < num3 + + strArray1[index12].Length * 10 + numArray2[index12] + && Game1.mouseState[0].Position.Y > num2 + num4 * index12 + + numArray1[index12] + && Game1.mouseState[0].Position.Y < num2 + num4 * index12 + 50 + numArray1[index12] + && Game1.hasFocus) { this.focusMenu = index12; if (flagArray1[index12] || flagArray2[index12]) @@ -5562,7 +5888,8 @@ protected void DrawMenu() { if (focusMenu != this.focusMenu) Game1.PlaySound(12); - if (Game1.mouseLeftRelease && Game1.mouseState.LeftButton == ButtonState.Pressed) + if (Game1.mouseLeftRelease && Game1.mouseState.Count==1//Game1.mouseState.LeftButton == ButtonState.Pressed + ) this.selectedMenu = index12; } } @@ -5587,11 +5914,26 @@ protected void DrawMenu() Game1.loadPlayer[index1].position.Y = (float) num7 + Game1.screenPosition.Y; this.DrawPlayer(Game1.loadPlayer[index1]); } - this.spriteBatch.Draw(Game1.cursorTexture, new Vector2((float) (Game1.mouseState.X + 1), (float) (Game1.mouseState.Y + 1)), new Rectangle?(new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), new Color((int) ((double) Game1.cursorColor.R * 0.20000000298023224), (int) ((double) Game1.cursorColor.G * 0.20000000298023224), (int) ((double) Game1.cursorColor.B * 0.20000000298023224), (int) ((double) Game1.cursorColor.A * 0.5)), 0.0f, new Vector2(), Game1.cursorScale * 1.1f, SpriteEffects.None, 0.0f); - this.spriteBatch.Draw(Game1.cursorTexture, new Vector2((float) Game1.mouseState.X, (float) Game1.mouseState.Y), new Rectangle?(new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), Game1.cursorColor, 0.0f, new Vector2(), Game1.cursorScale, SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.cursorTexture, + new Vector2((float) (Game1.mouseState[0].Position.X + 1), + (float) (Game1.mouseState[0].Position.Y + 1)), new Rectangle?( + new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), + new Color((int) ((double) Game1.cursorColor.R * 0.20000000298023224), + (int) ((double) Game1.cursorColor.G * 0.20000000298023224), + (int) ((double) Game1.cursorColor.B * 0.20000000298023224), + (int) ((double) Game1.cursorColor.A * 0.5)), 0.0f, + new Vector2(), Game1.cursorScale * 1.1f, SpriteEffects.None, 0.0f); + + this.spriteBatch.Draw(Game1.cursorTexture, + new Vector2((float) Game1.mouseState[0].Position.X, + (float) Game1.mouseState[0].Position.Y), new Rectangle?( + new Rectangle(0, 0, Game1.cursorTexture.Width, Game1.cursorTexture.Height)), + Game1.cursorColor, 0.0f, new Vector2(), Game1.cursorScale, SpriteEffects.None, 0.0f); this.spriteBatch.End(); - Game1.mouseLeftRelease = Game1.mouseState.LeftButton != ButtonState.Pressed; - if (Game1.mouseState.RightButton == ButtonState.Pressed) + Game1.mouseLeftRelease = (Game1.mouseState.Count == 0);//Game1.mouseState.LeftButton != ButtonState.Pressed; + if ( + Game1.mouseState.Count > 1 // Game1.mouseState.RightButton == ButtonState.Pressed + ) Game1.mouseRightRelease = false; else Game1.mouseRightRelease = true; @@ -5646,10 +5988,12 @@ protected override void Draw(GameTime gameTime) if (Game1.myPlayer >= 0) Game1.player[Game1.myPlayer].mouseInterface = false; Game1.toolTip = new Item(); - if (!Game1.debugMode && !Game1.gameMenu && Game1.netMode != 2) + + // screen panning + if (/*!Game1.debugMode && */ !Game1.gameMenu && Game1.netMode != 2) { - int num1 = Game1.mouseState.X; - int num2 = Game1.mouseState.Y; + int num1 = (int)Game1.mouseState[0].Position.X; + int num2 = (int)Game1.mouseState[0].Position.Y; if (num1 < 0) num1 = 0; if (num1 > Game1.screenWidth) @@ -5662,8 +6006,12 @@ protected override void Draw(GameTime gameTime) { int screenHeight = Game1.screenHeight; } - Game1.screenPosition.X = (float) ((double) Game1.player[Game1.myPlayer].position.X + (double) Game1.player[Game1.myPlayer].width * 0.5 - (double) Game1.screenWidth * 0.5); - Game1.screenPosition.Y = (float) ((double) Game1.player[Game1.myPlayer].position.Y + (double) Game1.player[Game1.myPlayer].height * 0.5 - (double) Game1.screenHeight * 0.5); + Game1.screenPosition.X = (float) ((double) Game1.player[Game1.myPlayer].position.X + + (double) Game1.player[Game1.myPlayer].width * 0.5 + - (double) Game1.screenWidth * 0.5); + Game1.screenPosition.Y = (float) ((double) Game1.player[Game1.myPlayer].position.Y + + (double) Game1.player[Game1.myPlayer].height * 0.5 + - (double) Game1.screenHeight * 0.5); Game1.screenPosition.X = (float) (int) Game1.screenPosition.X; Game1.screenPosition.Y = (float) (int) Game1.screenPosition.Y; } @@ -5678,13 +6026,17 @@ protected override void Draw(GameTime gameTime) else if ((double) Game1.screenPosition.Y + (double) Game1.screenHeight > (double) Game1.bottomWorld - 336.0 - 32.0) Game1.screenPosition.Y = (float) ((double) Game1.bottomWorld - (double) Game1.screenHeight - 336.0 - 32.0); } + this.GraphicsDevice.Clear(Color.Black); base.Draw(gameTime); this.spriteBatch.Begin(); double num3 = 0.5; - int num4 = (int) (-Math.IEEERemainder((double) Game1.screenPosition.X * num3, (double) Game1.backgroundWidth[Game1.background]) - (double) (Game1.backgroundWidth[Game1.background] / 2)); + int num4 = (int) (-Math.IEEERemainder((double) Game1.screenPosition.X * num3, + (double) Game1.backgroundWidth[Game1.background]) - (double) (Game1.backgroundWidth[Game1.background] / 2)); int num5 = Game1.screenWidth / Game1.backgroundWidth[Game1.background] + 2; - int y1 = (int) (-(double) Game1.screenPosition.Y / (Game1.worldSurface * 16.0 - (double) Game1.screenHeight) * (double) (Game1.backgroundHeight[Game1.background] - Game1.screenHeight)); + int y1 = (int) (-(double) Game1.screenPosition.Y / (Game1.worldSurface * 16.0 - + (double) Game1.screenHeight) * (double) (Game1.backgroundHeight[Game1.background] - Game1.screenHeight)); + if (Game1.gameMenu || Game1.netMode == 2) y1 = -200; Color white1 = Color.White; @@ -5908,30 +6260,49 @@ protected override void Draw(GameTime gameTime) } } if (Game1.dayTime) - this.spriteBatch.Draw(Game1.sunTexture, new Vector2((float) x1, (float) (num6 + (int) Game1.sunModY)), new Rectangle?(new Rectangle(0, 0, Game1.sunTexture.Width, Game1.sunTexture.Height)), white2, rotation1, new Vector2((float) (Game1.sunTexture.Width / 2), (float) (Game1.sunTexture.Height / 2)), scale1, SpriteEffects.None, 0.0f); + this.spriteBatch.Draw(Game1.sunTexture, + new Vector2((float) x1, (float) (num6 + (int) Game1.sunModY)), + new Rectangle?(new Rectangle(0, 0, Game1.sunTexture.Width, Game1.sunTexture.Height)), + white2, rotation1, new Vector2((float) (Game1.sunTexture.Width / 2), + (float) (Game1.sunTexture.Height / 2)), scale1, SpriteEffects.None, 0.0f); if (!Game1.dayTime) - this.spriteBatch.Draw(Game1.moonTexture, new Vector2((float) x2, (float) (num7 + (int) Game1.moonModY)), new Rectangle?(new Rectangle(0, Game1.moonTexture.Width * Game1.moonPhase, Game1.moonTexture.Width, Game1.moonTexture.Width)), white3, rotation2, new Vector2((float) (Game1.moonTexture.Width / 2), (float) (Game1.moonTexture.Width / 2)), scale2, SpriteEffects.None, 0.0f); - Rectangle rectangle1 = !Game1.dayTime ? new Rectangle((int) ((double) x2 - (double) Game1.moonTexture.Width * 0.5 * (double) scale2), (int) ((double) num7 - (double) Game1.moonTexture.Width * 0.5 * (double) scale2 + (double) Game1.moonModY), (int) ((double) Game1.moonTexture.Width * (double) scale2), (int) ((double) Game1.moonTexture.Width * (double) scale2)) : new Rectangle((int) ((double) x1 - (double) Game1.sunTexture.Width * 0.5 * (double) scale1), (int) ((double) num6 - (double) Game1.sunTexture.Height * 0.5 * (double) scale1 + (double) Game1.sunModY), (int) ((double) Game1.sunTexture.Width * (double) scale1), (int) ((double) Game1.sunTexture.Width * (double) scale1)); - Rectangle rectangle2 = new Rectangle(Game1.mouseState.X, Game1.mouseState.Y, 1, 1); + this.spriteBatch.Draw(Game1.moonTexture, + new Vector2((float) x2, (float) (num7 + (int) Game1.moonModY)), + new Rectangle?(new Rectangle(0, Game1.moonTexture.Width * Game1.moonPhase, + Game1.moonTexture.Width, Game1.moonTexture.Width)), white3, rotation2, + new Vector2((float) (Game1.moonTexture.Width / 2), + (float) (Game1.moonTexture.Width / 2)), scale2, SpriteEffects.None, 0.0f); + + Rectangle rectangle1 = !Game1.dayTime + ? new Rectangle((int) ((double) x2 - (double) Game1.moonTexture.Width * 0.5 * (double) scale2), (int) ((double) num7 - (double) Game1.moonTexture.Width * 0.5 * (double) scale2 + (double) Game1.moonModY), (int) ((double) Game1.moonTexture.Width * (double) scale2), (int) ((double) Game1.moonTexture.Width * (double) scale2)) : new Rectangle((int) ((double) x1 - (double) Game1.sunTexture.Width * 0.5 * (double) scale1), (int) ((double) num6 - (double) Game1.sunTexture.Height * 0.5 * (double) scale1 + (double) Game1.sunModY), (int) ((double) Game1.sunTexture.Width * (double) scale1), (int) ((double) Game1.sunTexture.Width * (double) scale1)); + + Rectangle rectangle2 = new Rectangle( + (int)Game1.mouseState[0].Position.X, + (int)Game1.mouseState[0].Position.Y, 1, 1); Game1.sunModY = (short) ((double) Game1.sunModY * 0.999); Game1.moonModY = (short) ((double) Game1.moonModY * 0.999); if (Game1.gameMenu && Game1.netMode != 1 || Game1.grabSun) { - if (Game1.mouseState.LeftButton == ButtonState.Pressed && Game1.hasFocus) + if (Game1.mouseState.Count == 1 //Game1.mouseState.LeftButton == ButtonState.Pressed + && Game1.hasFocus) { if (rectangle2.Intersects(rectangle1) || Game1.grabSky) { if (Game1.dayTime) { - Game1.time = 54000.0 * ((double) (Game1.mouseState.X + Game1.sunTexture.Width) / ((double) Game1.screenWidth + (double) (Game1.sunTexture.Width * 2))); - Game1.sunModY = (short) (Game1.mouseState.Y - num6); + Game1.time = 54000.0 * + ((double) (Game1.mouseState[0].Position.X + Game1.sunTexture.Width) + / ((double) Game1.screenWidth + (double) (Game1.sunTexture.Width * 2))); + Game1.sunModY = (short) (Game1.mouseState[0].Position.Y - num6); if (Game1.time > 53990.0) Game1.time = 53990.0; } else { - Game1.time = 32400.0 * ((double) (Game1.mouseState.X + Game1.moonTexture.Width) / ((double) Game1.screenWidth + (double) (Game1.moonTexture.Width * 2))); - Game1.moonModY = (short) (Game1.mouseState.Y - num7); + Game1.time = 32400.0 * ((double) (Game1.mouseState[0].Position.X + Game1.moonTexture.Width) + / ((double) Game1.screenWidth + (double) (Game1.moonTexture.Width * 2))); + + Game1.moonModY = (short) (Game1.mouseState[0].Position.Y - num7); if (Game1.time > 32390.0) Game1.time = 32390.0; } @@ -6012,9 +6383,12 @@ protected override void Draw(GameTime gameTime) firstY = 0; if (lastY > Game1.maxTilesY) lastY = Game1.maxTilesY; + Lighting.LightTiles(firstX, lastX, firstY, lastY); + Color white4 = Color.White; this.DrawWater(true); + double num36 = 1.0; int num37 = (int) (-Math.IEEERemainder((double) Game1.screenPosition.X * num36, (double) Game1.backgroundWidth[1]) - (double) (Game1.backgroundWidth[1] / 2)); int num38 = Game1.screenWidth / Game1.backgroundWidth[1] + 2; @@ -6498,9 +6872,12 @@ protected override void Draw(GameTime gameTime) this.DrawInterface(); } this.spriteBatch.End(); - Game1.mouseLeftRelease = Game1.mouseState.LeftButton != ButtonState.Pressed; - Game1.mouseRightRelease = Game1.mouseState.RightButton != ButtonState.Pressed; - if (Game1.mouseState.RightButton != ButtonState.Pressed) + + //RnD + Game1.mouseLeftRelease = (Game1.mouseState.Count == 0);//Game1.mouseState.LeftButton != ButtonState.Pressed; + Game1.mouseRightRelease = (Game1.mouseState.Count == 0);//Game1.mouseState.RightButton != ButtonState.Pressed; + if (Game1.mouseState.Count < 2//Game1.mouseState.RightButton != ButtonState.Pressed + ) Game1.stackSplit = 0; if (Game1.stackSplit <= 0) return; @@ -7060,40 +7437,43 @@ private static void UpdateDebug() if (Game1.netMode == 2) return; - // Panning control via WASD keys - if (Game1.keyState.IsKeyDown(/*Keys.Up*/Keys.W)) + // Panning control via WASD keys + if (Game1.keyState.IsKeyDown(/*Keys.Up*/Keys.W)) Game1.screenPosition.Y -= 8f;//32f; - if (Game1.keyState.IsKeyDown(/*Keys.Left*/Keys.A)) + if (Game1.keyState.IsKeyDown(/*Keys.Left*/Keys.A)) Game1.screenPosition.X -= 8f;//32f; - if (Game1.keyState.IsKeyDown(/*Keys.Down*/Keys.S)) + if (Game1.keyState.IsKeyDown(/*Keys.Down*/Keys.S)) Game1.screenPosition.Y += 8f;//32f; - if (Game1.keyState.IsKeyDown(/*Keys.Right*/Keys.D)) + if (Game1.keyState.IsKeyDown(/*Keys.Right*/Keys.D)) Game1.screenPosition.X += 8f;//32f; - int i = (int) (((double) Game1.mouseState.X + (double) Game1.screenPosition.X) / 16.0); - int j = (int) (((double) Game1.mouseState.Y + (double) Game1.screenPosition.Y) / 16.0); + //RnD + if (Game1.mouseState.Count == 0) + return; + + int i = (int) (((double) Game1.mouseState[0].Position.X + (double) Game1.screenPosition.X) / 16.0); + int j = (int) (((double) Game1.mouseState[0].Position.Y + (double) Game1.screenPosition.Y) / 16.0)-1; if - (Game1.mouseState.X >= Game1.screenWidth - || Game1.mouseState.Y >= Game1.screenHeight + (Game1.mouseState[0].Position.X >= Game1.screenWidth + || Game1.mouseState[0].Position.Y >= Game1.screenHeight || i < 0 || j < 0 || i >= Game1.maxTilesX || j >= Game1.maxTilesY ) return; - /* + // RnD: Light ? Lighting.addLight(i, j, 1f); - if (Game1.mouseState.RightButton != ButtonState.Pressed - || Game1.mouseState.LeftButton != ButtonState.Pressed) - { - // - } + //if (Game1.mouseState.RightButton != ButtonState.Pressed + //|| Game1.mouseState.LeftButton != ButtonState.Pressed) + //{} - if (Game1.mouseState.RightButton == ButtonState.Pressed) + if (Game1.mouseState.Count == 2//Game1.mouseState.RightButton == ButtonState.Pressed + ) { int player = Game1.myPlayer; int number = Game1.rand.Next(8); @@ -7113,7 +7493,8 @@ private static void UpdateDebug() ++num; } } - else if (Game1.mouseState.LeftButton == ButtonState.Pressed) + else if (Game1.mouseState.Count == 3//Game1.mouseState.LeftButton == ButtonState.Pressed + ) { WorldGen.KillTile(i, j); for (int index1 = -5; index1 <= 5; ++index1) @@ -7125,7 +7506,7 @@ private static void UpdateDebug() } } } - */ + }//UpdateDebug diff --git a/Src/MT1Beta/Main/Lighting.cs b/Src/MT1Beta/Main/Lighting.cs index 42d34c34..2a178405 100644 --- a/Src/MT1Beta/Main/Lighting.cs +++ b/Src/MT1Beta/Main/Lighting.cs @@ -194,20 +194,32 @@ public static void LightTiles(int firstX, int lastX, int firstY, int lastY) } } + // addLight public static void addLight(int i, int j, float Lightness) { - if (Lighting.tempLightCount == Lighting.maxTempLights || i - Lighting.firstTileX + 21 < 0 || i - Lighting.firstTileX + 21 >= Game1.screenWidth / 16 + 42 + 10 || j - Lighting.firstTileY + 21 < 0 || j - Lighting.firstTileY + 21 >= Game1.screenHeight / 16 + 42 + 10) + if + ( + Lighting.tempLightCount == Lighting.maxTempLights + || i - Lighting.firstTileX + 21 < 0 + || i - Lighting.firstTileX + 21 >= Game1.screenWidth / 16 + 42 + 10 + || j - Lighting.firstTileY + 21 < 0 + || j - Lighting.firstTileY + 21 >= Game1.screenHeight / 16 + 42 + 10 + ) return; + for (int index = 0; index < Lighting.tempLightCount; ++index) { - if (Lighting.tempLightX[index] == i && Lighting.tempLightY[index] == j && (double) Lightness <= (double) Lighting.tempLight[index]) + if (Lighting.tempLightX[index] == i && Lighting.tempLightY[index] == j + && (double) Lightness <= (double) Lighting.tempLight[index]) return; } Lighting.tempLightX[Lighting.tempLightCount] = i; Lighting.tempLightY[Lighting.tempLightCount] = j; Lighting.tempLight[Lighting.tempLightCount] = Lightness; + ++Lighting.tempLightCount; - } + }//addLight + private static void LightColor(int i, int j) { @@ -266,7 +278,7 @@ public static Color GetColor(int x, int y, Color oldColor) return oldColor; if (index1 < 0 || index2 < 0 || index1 >= Game1.screenWidth / 16 + 42 + 10 || index2 >= Game1.screenHeight / 16 + 42 + 10) return Color.Black; - return Color.White with + return new Color//.White with { R = (byte) ((double) oldColor.R * (double) Lighting.color[index1, index2]), G = (byte) ((double) oldColor.G * (double) Lighting.color[index1, index2]), diff --git a/Src/MT1Beta/Main/Player.cs b/Src/MT1Beta/Main/Player.cs index 53cbd417..e1f3d164 100644 --- a/Src/MT1Beta/Main/Player.cs +++ b/Src/MT1Beta/Main/Player.cs @@ -296,11 +296,16 @@ public void UpdatePlayer(int i) if (Game1.keyState.IsKeyDown(Keys.Space)) this.controlJump = true; } - if (Game1.mouseState.LeftButton == ButtonState.Pressed && !this.mouseInterface) + if (Game1.mouseState.Count == 1//Game1.mouseState.LeftButton == ButtonState.Pressed + && !this.mouseInterface) this.controlUseItem = true; - if (Game1.mouseState.RightButton == ButtonState.Pressed && !this.mouseInterface) + + if (Game1.mouseState.Count > 1//Game1.mouseState.RightButton == ButtonState.Pressed + && !this.mouseInterface) this.controlUseTile = true; - if (Game1.keyState.IsKeyDown(Keys.Escape)) + + // 4-finger touch gives Escape ! =) + if (Game1.keyState.IsKeyDown(Keys.Escape) || Game1.mouseState.Count > 3) { if (this.releaseInventory) { @@ -345,11 +350,17 @@ public void UpdatePlayer(int i) { int num7 = Game1.chatMode ? 1 : 0; } - if ((Game1.mouseState.LeftButton == ButtonState.Pressed && !this.mouseInterface && Game1.mouseLeftRelease || !Game1.playerInventory ? (Game1.mouseItem.type > 0 ? 1 : 0) : 0) != 0) + + if ((Game1.mouseState.Count == 1 //Game1.mouseState.LeftButton == ButtonState.Pressed + && !this.mouseInterface && Game1.mouseLeftRelease + || !Game1.playerInventory ? (Game1.mouseItem.type > 0 ? 1 : 0) : 0) != 0) { Item obj = new Item(); bool flag = false; - if ((Game1.mouseState.LeftButton == ButtonState.Pressed && !this.mouseInterface && Game1.mouseLeftRelease || !Game1.playerInventory) && Game1.mouseItem.type > 0) + + if ((Game1.mouseState.Count == 1 //Game1.mouseState.LeftButton == ButtonState.Pressed + && !this.mouseInterface && Game1.mouseLeftRelease + || !Game1.playerInventory) && Game1.mouseItem.type > 0) { obj = this.inventory[this.selectedItem]; this.inventory[this.selectedItem] = Game1.mouseItem; @@ -372,7 +383,9 @@ public void UpdatePlayer(int i) Game1.item[number].noGrabDelay = 100; Game1.item[number].velocity.Y = -2f; Game1.item[number].velocity.X = (float) (4 * this.direction) + this.velocity.X; - if ((Game1.mouseState.LeftButton == ButtonState.Pressed && !this.mouseInterface || !Game1.playerInventory) && Game1.mouseItem.type > 0) + + if ((Game1.mouseState.Count == 1 //Game1.mouseState.LeftButton == ButtonState.Pressed + && !this.mouseInterface || !Game1.playerInventory) && Game1.mouseItem.type > 0) { this.inventory[this.selectedItem] = obj; Game1.mouseItem = new Item(); @@ -411,7 +424,10 @@ public void UpdatePlayer(int i) this.selectedItem = 9; if (selectedItem != this.selectedItem) Game1.PlaySound(12); - int num8 = (Game1.mouseState.ScrollWheelValue - Game1.oldMouseState.ScrollWheelValue) / 120; + + //RnD: Scroll wheel + int num8 = 0;//(Game1.mouseState.ScrollWheelValue - Game1.oldMouseState.ScrollWheelValue) / 120; + while (num8 > 9) num8 -= 10; while (num8 < 0) @@ -433,8 +449,9 @@ public void UpdatePlayer(int i) } else { - int num9 = (Game1.mouseState.ScrollWheelValue - Game1.oldMouseState.ScrollWheelValue) / 120; + int num9 = 0;//(Game1.mouseState.ScrollWheelValue - Game1.oldMouseState.ScrollWheelValue) / 120; Game1.focusRecipe += num9; + if (Game1.focusRecipe > Game1.numAvailableRecipes - 1) Game1.focusRecipe = Game1.numAvailableRecipes - 1; if (Game1.focusRecipe < 0) @@ -505,8 +522,12 @@ public void UpdatePlayer(int i) } if (this.mouseInterface) this.delayUseItem = true; - Player.tileTargetX = (int) (((double) Game1.mouseState.X + (double) Game1.screenPosition.X) / 16.0); - Player.tileTargetY = (int) (((double) Game1.mouseState.Y + (double) Game1.screenPosition.Y) / 16.0); + + Player.tileTargetX = (int) (((double) Game1.mouseState[0].Position.X + + (double) Game1.screenPosition.X) / 16.0); + + Player.tileTargetY = (int) (((double) Game1.mouseState[0].Position.Y + + (double) Game1.screenPosition.Y) / 16.0); if (this.immune) { --this.immuneTime; @@ -2144,9 +2165,14 @@ public void ItemCheck(int i) } if (this.inventory[this.selectedItem].shoot == 17 && flag && i == Game1.myPlayer) { - int index1 = (int) ((double) Game1.mouseState.X + (double) Game1.screenPosition.X) / 16; - int index2 = (int) ((double) Game1.mouseState.Y + (double) Game1.screenPosition.Y) / 16; - if (Game1.tile[index1, index2].active && (Game1.tile[index1, index2].type == (byte) 0 || Game1.tile[index1, index2].type == (byte) 2 || Game1.tile[index1, index2].type == (byte) 23)) + int index1 = (int) ((double) Game1.mouseState[0].Position.X + + (double) Game1.screenPosition.X) / 16; + int index2 = (int) ((double) Game1.mouseState[0].Position.Y + + (double) Game1.screenPosition.Y) / 16; + if (Game1.tile[index1, index2].active + && (Game1.tile[index1, index2].type == (byte) 0 + || Game1.tile[index1, index2].type == (byte) 2 + || Game1.tile[index1, index2].type == (byte) 23)) { WorldGen.KillTile(index1, index2, noItem: true); if (!Game1.tile[index1, index2].active) @@ -2403,29 +2429,37 @@ public void ItemCheck(int i) if (Type == 1 && this.inventory[this.selectedItem].type == 120) Type = 2; this.itemTime = this.inventory[this.selectedItem].useTime; - this.direction = (double) Game1.mouseState.X + (double) Game1.screenPosition.X <= (double) this.position.X + (double) this.width * 0.5 ? -1 : 1; - Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + this.direction = (double) Game1.mouseState[0].Position.X + + (double) Game1.screenPosition.X <= (double) this.position.X + + (double) this.width * 0.5 ? -1 : 1; + + Vector2 vector2 = new Vector2(this.position.X + + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); if (Type == 9) { - vector2 = new Vector2(this.position.X + (float) this.width * 0.5f + (float) (Game1.rand.Next(601) * -this.direction), (float) ((double) this.position.Y + (double) this.height * 0.5 - 300.0) - (float) Game1.rand.Next(100)); + vector2 = new Vector2(this.position.X + (float) this.width * 0.5f + + (float) (Game1.rand.Next(601) * -this.direction), + (float) ((double) this.position.Y + (double) this.height * 0.5 - 300.0) + - (float) Game1.rand.Next(100)); KnockBack = 0.0f; } - float num5 = (float) Game1.mouseState.X + Game1.screenPosition.X - vector2.X; - float num6 = (float) Game1.mouseState.Y + Game1.screenPosition.Y - vector2.Y; + float num5 = (float) Game1.mouseState[0].Position.X + Game1.screenPosition.X - vector2.X; + float num6 = (float) Game1.mouseState[0].Position.Y + Game1.screenPosition.Y - vector2.Y; float num7 = (float) Math.Sqrt((double) num5 * (double) num5 + (double) num6 * (double) num6); float num8 = shootSpeed / num7; float SpeedX = num5 * num8; float SpeedY = num6 * num8; if (this.inventory[this.selectedItem].useStyle == 5) { - this.itemRotation = (float) Math.Atan2((double) SpeedY * (double) this.direction, (double) SpeedX * (double) this.direction); + this.itemRotation = (float) Math.Atan2((double) SpeedY * (double) this.direction, + (double) SpeedX * (double) this.direction); NetMessage.SendData(13, number: this.whoAmi); NetMessage.SendData(41, number: this.whoAmi); } if (Type == 17) { - vector2.X = (float) Game1.mouseState.X + Game1.screenPosition.X; - vector2.Y = (float) Game1.mouseState.Y + Game1.screenPosition.Y; + vector2.X = (float) Game1.mouseState[0].Position.X + Game1.screenPosition.X; + vector2.Y = (float) Game1.mouseState[0].Position.Y + Game1.screenPosition.Y; } Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, damage, KnockBack, i); } @@ -2649,12 +2683,35 @@ public void ItemCheck(int i) } if (this.inventory[this.selectedItem].createWall >= 0) { - Player.tileTargetX = (int) (((double) Game1.mouseState.X + (double) Game1.screenPosition.X) / 16.0); - Player.tileTargetY = (int) (((double) Game1.mouseState.Y + (double) Game1.screenPosition.Y) / 16.0); - if ((double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost <= (double) Player.tileTargetX && ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 >= (double) Player.tileTargetX && (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost <= (double) Player.tileTargetY && ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 >= (double) Player.tileTargetY) + Player.tileTargetX = (int) (((double) Game1.mouseState[0].Position.X + + (double) Game1.screenPosition.X) / 16.0); + Player.tileTargetY = (int) (((double) Game1.mouseState[0].Position.Y + + (double) Game1.screenPosition.Y) / 16.0); + + if ((double) this.position.X / 16.0 - (double) Player.tileRangeX + - (double) this.inventory[this.selectedItem].tileBoost <= (double) Player.tileTargetX + && ((double) this.position.X + (double) this.width) / 16.0 + + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost + - 1.0 >= (double) Player.tileTargetX + && (double) this.position.Y / 16.0 + - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost + <= (double) Player.tileTargetY + && ((double) this.position.Y + (double) this.height) / 16.0 + + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost + - 2.0 >= (double) Player.tileTargetY) { this.showItemIcon = true; - if (this.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem && (Game1.tile[Player.tileTargetX + 1, Player.tileTargetY].active || Game1.tile[Player.tileTargetX + 1, Player.tileTargetY].wall > (byte) 0 || Game1.tile[Player.tileTargetX - 1, Player.tileTargetY].active || Game1.tile[Player.tileTargetX - 1, Player.tileTargetY].wall > (byte) 0 || Game1.tile[Player.tileTargetX, Player.tileTargetY + 1].active || Game1.tile[Player.tileTargetX, Player.tileTargetY + 1].wall > (byte) 0 || Game1.tile[Player.tileTargetX, Player.tileTargetY - 1].active || Game1.tile[Player.tileTargetX, Player.tileTargetY - 1].wall > (byte) 0) && (int) Game1.tile[Player.tileTargetX, Player.tileTargetY].wall != this.inventory[this.selectedItem].createWall) + if (this.itemTime == 0 && this.itemAnimation > 0 && this.controlUseItem + && (Game1.tile[Player.tileTargetX + 1, Player.tileTargetY].active + || Game1.tile[Player.tileTargetX + 1, Player.tileTargetY].wall > (byte) 0 + || Game1.tile[Player.tileTargetX - 1, Player.tileTargetY].active + || Game1.tile[Player.tileTargetX - 1, Player.tileTargetY].wall > (byte) 0 + || Game1.tile[Player.tileTargetX, Player.tileTargetY + 1].active + || Game1.tile[Player.tileTargetX, Player.tileTargetY + 1].wall > (byte) 0 + || Game1.tile[Player.tileTargetX, Player.tileTargetY - 1].active + || Game1.tile[Player.tileTargetX, Player.tileTargetY - 1].wall > (byte) 0) + && (int) Game1.tile[Player.tileTargetX, + Player.tileTargetY].wall != this.inventory[this.selectedItem].createWall) { WorldGen.PlaceWall(Player.tileTargetX, Player.tileTargetY, this.inventory[this.selectedItem].createWall); if ((int) Game1.tile[Player.tileTargetX, Player.tileTargetY].wall == this.inventory[this.selectedItem].createWall) diff --git a/Src/MT1Beta/Main/Projectile.cs b/Src/MT1Beta/Main/Projectile.cs index 2edb5f94..80aed447 100644 --- a/Src/MT1Beta/Main/Projectile.cs +++ b/Src/MT1Beta/Main/Projectile.cs @@ -1291,8 +1291,8 @@ public void AI() { float num29 = 12f; Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); - float num30 = (float) Game1.mouseState.X + Game1.screenPosition.X - vector2.X; - float num31 = (float) Game1.mouseState.Y + Game1.screenPosition.Y - vector2.Y; + float num30 = (float) Game1.mouseState[0].Position.X + Game1.screenPosition.X - vector2.X; + float num31 = (float) Game1.mouseState[0].Position.Y + Game1.screenPosition.Y - vector2.Y; num1 = (float) Math.Sqrt((double) num30 * (double) num30 + (double) num31 * (double) num31); float num32 = (float) Math.Sqrt((double) num30 * (double) num30 + (double) num31 * (double) num31); if ((double) num32 > (double) num29) @@ -1339,11 +1339,15 @@ public void AI() if (Game1.player[this.owner].channel) { float num36 = 12f; - Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); - float num37 = (float) Game1.mouseState.X + Game1.screenPosition.X - vector2.X; - float num38 = (float) Game1.mouseState.Y + Game1.screenPosition.Y - vector2.Y; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, + this.position.Y + (float) this.height * 0.5f); + + float num37 = (float) Game1.mouseState[0].Position.X + Game1.screenPosition.X - vector2.X; + float num38 = (float) Game1.mouseState[0].Position.Y + Game1.screenPosition.Y - vector2.Y; num1 = (float) Math.Sqrt((double) num37 * (double) num37 + (double) num38 * (double) num38); - float num39 = (float) Math.Sqrt((double) num37 * (double) num37 + (double) num38 * (double) num38); + + float num39 = (float) Math.Sqrt((double) num37 * (double) num37 + + (double) num38 * (double) num38); if ((double) num39 > (double) num36) { float num40 = num36 / num39; diff --git a/Src/MT1Beta/Main/WorldGen.cs b/Src/MT1Beta/Main/WorldGen.cs index 80819339..83bf99aa 100644 --- a/Src/MT1Beta/Main/WorldGen.cs +++ b/Src/MT1Beta/Main/WorldGen.cs @@ -823,7 +823,8 @@ public static void saveWorld(bool resetTime = false) binaryWriter.Write(Game1.invasionX); for (int index1 = 0; index1 < Game1.maxTilesX; ++index1) { - Game1.statusText = "Saving world data: " + (object) (int) ((double) ((float) index1 / (float) Game1.maxTilesX) * 100.0 + 1.0) + "%"; + Game1.statusText = "Saving world data: " + (object) (int) ( + (double) ((float) index1 / (float) Game1.maxTilesX) * 100.0 + 1.0) + "%"; for (int index2 = 0; index2 < Game1.maxTilesY; ++index2) { binaryWriter.Write(Game1.tile[index1, index2].active); diff --git a/Src/MT1Beta/Package.appxmanifest b/Src/MT1Beta/Package.appxmanifest index c72783b8..819301fd 100644 --- a/Src/MT1Beta/Package.appxmanifest +++ b/Src/MT1Beta/Package.appxmanifest @@ -1,9 +1,9 @@  - - + + - MTerraria v1-beta + MTerraria v1-beta1 mediaexplorer Assets\StoreLogo.png @@ -29,11 +29,11 @@ + - - + \ No newline at end of file diff --git a/Src/MT1Beta/mt.csproj b/Src/MT1Beta/mt.csproj index 72920deb..373d50df 100644 --- a/Src/MT1Beta/mt.csproj +++ b/Src/MT1Beta/mt.csproj @@ -28,8 +28,7 @@ arm 0 OnApplicationRun - - + 9799F1FE49F3C3576A892AD5A413ECFEDAB3DD9C True SHA256 True diff --git a/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.XAudio.cs b/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.XAudio.cs index b194b927..edbf542e 100644 --- a/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.XAudio.cs +++ b/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.XAudio.cs @@ -360,7 +360,7 @@ private void PlatformSetupInstance(SoundEffectInstance inst) { if (_format != null) { - //Debug.WriteLine("[i] PlatformSetupInstance: _format =", _format.ToString()); + //Debug.WriteLine("[i] PlatformSetupInstance: _format=", _format.ToString()); voice = new SourceVoice(Device, _format, VoiceFlags.None, @@ -371,14 +371,14 @@ private void PlatformSetupInstance(SoundEffectInstance inst) } else { - //Debug.WriteLine("[ex] PlatformSetupInstance: _format IS NULL!"); + Debug.WriteLine("[ex] PlatformSetupInstance: _format IS NULL!"); // Experimental! Del it if all sound system fails // Plan A - //voice = new SourceVoice(Device, default, VoiceFlags.None, - // XAudio2.MaximumFrequencyRatio); - //inst._voice = voice; - //inst._format = _format; + voice = new SourceVoice(Device, default, VoiceFlags.None, + XAudio2.MaximumFrequencyRatio); + inst._voice = voice; + inst._format = _format; //RnD: PLAN B //voice = new SourceVoice(Device, _format, VoiceFlags.UseFilter, diff --git a/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.cs b/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.cs index 91cefff2..1b15589b 100644 --- a/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.cs +++ b/Src/MonoGame/MonoGame.Framework/Audio/SoundEffect.cs @@ -71,7 +71,7 @@ internal SoundEffect(MiniFormatTag codec, byte[] buffer, int channels, { // Handle the common case... the rest is platform specific. //RnD : true -- WMA experimental mode enabled - if ( /*true*/codec == MiniFormatTag.Pcm ) + if ( codec == MiniFormatTag.Pcm ) { _duration = TimeSpan.FromSeconds((float)buffer.Length / (sampleRate * blockAlignment)); PlatformInitializePcm(buffer, 0, buffer.Length, 16, sampleRate, diff --git a/Src/MonoGame/MonoGame.Framework/Audio/Xact/SoundBank.cs b/Src/MonoGame/MonoGame.Framework/Audio/Xact/SoundBank.cs index 41920f8d..aa4badcc 100644 --- a/Src/MonoGame/MonoGame.Framework/Audio/Xact/SoundBank.cs +++ b/Src/MonoGame/MonoGame.Framework/Audio/Xact/SoundBank.cs @@ -62,10 +62,10 @@ public SoundBank(AudioEngine audioEngine, string fileName) // TODO: This does not match XNA, XNA uses 43. - if (formatVersion != 46) + if (formatVersion != 43/*46*/) { Debug.WriteLine("[i] Soundbank - " + - "SoundBank format {0} not supported!", formatVersion); + "SoundBank format {0} not supported.", formatVersion); } reader.ReadUInt16(); // crc, TODO: Verify crc (FCS16) diff --git a/Src/MonoGame/MonoGame.Framework/BoundingFrustum.cs b/Src/MonoGame/MonoGame.Framework/BoundingFrustum.cs index ec3c71c9..6a7c35c7 100644 --- a/Src/MonoGame/MonoGame.Framework/BoundingFrustum.cs +++ b/Src/MonoGame/MonoGame.Framework/BoundingFrustum.cs @@ -344,8 +344,7 @@ public void GetCorners(Vector3[] corners) { if (corners == null) { - throw new - ("corners"); + throw new ArgumentNullException("corners"); } if (corners.Length < CornerCount) diff --git a/Src/MonoGame/MonoGame.Framework/BoundingSphere.cs b/Src/MonoGame/MonoGame.Framework/BoundingSphere.cs index b0083eee..69abccf9 100644 --- a/Src/MonoGame/MonoGame.Framework/BoundingSphere.cs +++ b/Src/MonoGame/MonoGame.Framework/BoundingSphere.cs @@ -287,8 +287,7 @@ public static BoundingSphere CreateFromFrustum(BoundingFrustum frustum) public static BoundingSphere CreateFromPoints(IEnumerable points) { if (points == null ) - throw new - ("points"); + throw new ArgumentNullException("points"); // From "Real-Time Collision Detection" (Page 89) diff --git a/Src/MonoGame/MonoGame.Framework/Graphics/Vertices/VertexElement.cs b/Src/MonoGame/MonoGame.Framework/Graphics/Vertices/VertexElement.cs index b6406fc2..780bca7a 100644 --- a/Src/MonoGame/MonoGame.Framework/Graphics/Vertices/VertexElement.cs +++ b/Src/MonoGame/MonoGame.Framework/Graphics/Vertices/VertexElement.cs @@ -16,6 +16,7 @@ public partial struct VertexElement : IEquatable private VertexElementUsage _usage; private int _usageIndex; + /// /// Gets or sets the offset in bytes from the beginning of the stream to the vertex element. /// @@ -72,14 +73,15 @@ public int UsageIndex /// The element format. /// The HLSL semantic of the element in the vertex shader input-signature. /// The semantic index, which is required if the semantic is used for more than one vertex element. - public VertexElement(int offset, VertexElementFormat elementFormat, VertexElementUsage elementUsage, int usageIndex) + public VertexElement(int offset, VertexElementFormat elementFormat, + VertexElementUsage elementUsage, int usageIndex) : this() { _offset = offset; _format = elementFormat; _usageIndex = usageIndex; _usage = elementUsage; } - + /// /// Returns a hash code for this instance. /// diff --git a/Src/ReLogic/AssemblyInfo.cs b/Src/ReLogic/AssemblyInfo.cs deleted file mode 100644 index a4145a72..00000000 --- a/Src/ReLogic/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security.Permissions; - -[assembly: Extension] -[assembly: AssemblyTitle("ReLogic")] -[assembly: AssemblyProduct("ReLogic")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("Re-Logic")] -[assembly: AssemblyCopyright("Copyright © Re-Logic 2017")] -[assembly: AssemblyTrademark("")] -[assembly: ComVisible(false)] -[assembly: Guid("06838aee-cc42-4fc8-adbf-3799c2c09b19")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] diff --git a/Src/ReLogic/Graphics/DynamicSpriteFont.cs b/Src/ReLogic/Graphics/DynamicSpriteFont.cs deleted file mode 100644 index e33da23e..00000000 --- a/Src/ReLogic/Graphics/DynamicSpriteFont.cs +++ /dev/null @@ -1,224 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Graphics.DynamicSpriteFont -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Text; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; - -namespace ReLogic.Graphics -{ - public class DynamicSpriteFont : IFontMetrics - { - private Dictionary _spriteCharacters = new Dictionary(); - private DynamicSpriteFont.SpriteCharacterData _defaultCharacterData; - public readonly char DefaultCharacter; - private readonly float _characterSpacing; - private readonly int _lineSpacing; - - public float CharacterSpacing => this._characterSpacing; - - public int LineSpacing => this._lineSpacing; - - public DynamicSpriteFont(float spacing, int lineSpacing, char defaultCharacter) - { - this._characterSpacing = spacing; - this._lineSpacing = lineSpacing; - this.DefaultCharacter = defaultCharacter; - } - - public bool IsCharacterSupported(char character) => character == '\n' || character == '\r' || this._spriteCharacters.ContainsKey(character); - - public bool AreCharactersSupported(IEnumerable characters) - { - foreach (char character in characters) - { - if (!this.IsCharacterSupported(character)) - return false; - } - return true; - } - - internal void SetPages(FontPage[] pages) - { - int capacity = 0; - foreach (FontPage page in pages) - capacity += page.Characters.Count; - this._spriteCharacters = new Dictionary(capacity); - foreach (FontPage page in pages) - { - for (int index = 0; index < page.Characters.Count; ++index) - { - this._spriteCharacters.Add(page.Characters[index], new DynamicSpriteFont.SpriteCharacterData(page.Texture, page.Glyphs[index], page.Padding[index], page.Kerning[index])); - if ((int) page.Characters[index] == (int) this.DefaultCharacter) - this._defaultCharacterData = this._spriteCharacters[page.Characters[index]]; - } - } - } - - internal void InternalDraw( - string text, - SpriteBatch spriteBatch, - Vector2 startPosition, - Color color, - float rotation, - Vector2 origin, - ref Vector2 scale, - SpriteEffects spriteEffects, - float depth) - { - Matrix matrix = Matrix.CreateTranslation(-origin.X * scale.X, -origin.Y * scale.Y, 0.0f) * Matrix.CreateRotationZ(rotation); - Vector2 zero = Vector2.Zero; - Vector2 one = Vector2.One; - bool flag = true; - float num = 0.0f; - if (spriteEffects != SpriteEffects.None) - { - Vector2 vector2 = this.MeasureString(text); - if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) - { - num = vector2.X * scale.X; - one.X = -1f; - } - if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipVertically)) - { - zero.Y = (vector2.Y - (float) this.LineSpacing) * scale.Y; - one.Y = -1f; - } - } - zero.X = num; - for (int index = 0; index < text.Length; ++index) - { - char character = text[index]; - switch (character) - { - case '\n': - zero.X = num; - zero.Y += (float) this.LineSpacing * scale.Y * one.Y; - flag = true; - continue; - case '\r': - continue; - default: - DynamicSpriteFont.SpriteCharacterData characterData = this.GetCharacterData(character); - Vector3 kerning = characterData.Kerning; - Rectangle padding = characterData.Padding; - if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) - padding.X -= padding.Width; - if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipVertically)) - padding.Y = this.LineSpacing - characterData.Glyph.Height - padding.Y; - if (flag) - kerning.X = Math.Max(kerning.X, 0.0f); - else - zero.X += this.CharacterSpacing * scale.X * one.X; - zero.X += kerning.X * scale.X * one.X; - Vector2 result = zero; - result.X += (float) padding.X * scale.X; - result.Y += (float) padding.Y * scale.Y; - Vector2.Transform(ref result, ref matrix, out result); - Vector2 position = result + startPosition; - spriteBatch.Draw(characterData.Texture, position, new Rectangle?(characterData.Glyph), color, rotation, Vector2.Zero, scale, spriteEffects, depth); - zero.X += (kerning.Y + kerning.Z) * scale.X * one.X; - flag = false; - continue; - } - } - } - - private DynamicSpriteFont.SpriteCharacterData GetCharacterData(char character) - { - DynamicSpriteFont.SpriteCharacterData defaultCharacterData; - if (!this._spriteCharacters.TryGetValue(character, out defaultCharacterData)) - defaultCharacterData = this._defaultCharacterData; - return defaultCharacterData; - } - - public Vector2 MeasureString(string text) - { - if (text.Length == 0) - return Vector2.Zero; - Vector2 zero = Vector2.Zero with - { - Y = (float) this.LineSpacing - }; - float val2 = 0.0f; - int num = 0; - float val1 = 0.0f; - bool flag = true; - for (int index = 0; index < text.Length; ++index) - { - char character = text[index]; - switch (character) - { - case '\n': - val2 = Math.Max(zero.X + Math.Max(val1, 0.0f), val2); - val1 = 0.0f; - zero = Vector2.Zero with - { - Y = (float) this.LineSpacing - }; - flag = true; - ++num; - continue; - case '\r': - continue; - default: - DynamicSpriteFont.SpriteCharacterData characterData = this.GetCharacterData(character); - Vector3 kerning = characterData.Kerning; - if (flag) - kerning.X = Math.Max(kerning.X, 0.0f); - else - zero.X += this.CharacterSpacing + val1; - zero.X += kerning.X + kerning.Y; - val1 = kerning.Z; - zero.Y = Math.Max(zero.Y, (float) characterData.Padding.Height); - flag = false; - continue; - } - } - zero.X += Math.Max(val1, 0.0f); - zero.Y += (float) (num * this.LineSpacing); - zero.X = Math.Max(zero.X, val2); - return zero; - } - - public string CreateWrappedText(string text, float maxWidth) => this.CreateWrappedText(text, maxWidth, Thread.CurrentThread.CurrentCulture); - - public string CreateWrappedText(string text, float maxWidth, CultureInfo culture) - { - WrappedTextBuilder wrappedTextBuilder = new WrappedTextBuilder((IFontMetrics) this, maxWidth, culture); - wrappedTextBuilder.Append(text); - return wrappedTextBuilder.ToString(); - } - - public GlyphMetrics GetCharacterMetrics(char character) => this.GetCharacterData(character).ToGlyphMetric(); - - private struct SpriteCharacterData - { - public readonly Texture2D Texture; - public readonly Rectangle Glyph; - public readonly Rectangle Padding; - public readonly Vector3 Kerning; - - public SpriteCharacterData( - Texture2D texture, - Rectangle glyph, - Rectangle padding, - Vector3 kerning) - { - this.Texture = texture; - this.Glyph = glyph; - this.Padding = padding; - this.Kerning = kerning; - } - - public GlyphMetrics ToGlyphMetric() => GlyphMetrics.FromKerningData(this.Kerning.X, this.Kerning.Y, this.Kerning.Z); - } - } -} diff --git a/Src/ReLogic/Graphics/DynamicSpriteFontExtensionMethods.cs b/Src/ReLogic/Graphics/DynamicSpriteFontExtensionMethods.cs deleted file mode 100644 index 14f07e33..00000000 --- a/Src/ReLogic/Graphics/DynamicSpriteFontExtensionMethods.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Graphics.DynamicSpriteFontExtensionMethods -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Text; - -namespace ReLogic.Graphics -{ - public static class DynamicSpriteFontExtensionMethods - { - public static void DrawString( - this SpriteBatch spriteBatch, - DynamicSpriteFont spriteFont, - string text, - Vector2 position, - Color color) - { - Vector2 one = Vector2.One; - spriteFont.InternalDraw(text, spriteBatch, position, color, 0.0f, Vector2.Zero, ref one, SpriteEffects.None, 0.0f); - } - - public static void DrawString( - this SpriteBatch spriteBatch, - DynamicSpriteFont spriteFont, - StringBuilder text, - Vector2 position, - Color color) - { - Vector2 one = Vector2.One; - spriteFont.InternalDraw(text.ToString(), spriteBatch, position, color, 0.0f, Vector2.Zero, ref one, SpriteEffects.None, 0.0f); - } - - public static void DrawString( - this SpriteBatch spriteBatch, - DynamicSpriteFont spriteFont, - string text, - Vector2 position, - Color color, - float rotation, - Vector2 origin, - float scale, - SpriteEffects effects, - float layerDepth) - { - spriteFont.InternalDraw(text, spriteBatch, position, color, rotation, origin, ref new Vector2() - { - X = scale, - Y = scale - }, effects, layerDepth); - } - - public static void DrawString( - this SpriteBatch spriteBatch, - DynamicSpriteFont spriteFont, - StringBuilder text, - Vector2 position, - Color color, - float rotation, - Vector2 origin, - float scale, - SpriteEffects effects, - float layerDepth) - { - Vector2 scale1 = new Vector2(scale); - spriteFont.InternalDraw(text.ToString(), spriteBatch, position, color, rotation, origin, ref scale1, effects, layerDepth); - } - - public static void DrawString( - this SpriteBatch spriteBatch, - DynamicSpriteFont spriteFont, - string text, - Vector2 position, - Color color, - float rotation, - Vector2 origin, - Vector2 scale, - SpriteEffects effects, - float layerDepth) - { - spriteFont.InternalDraw(text, spriteBatch, position, color, rotation, origin, ref scale, effects, layerDepth); - } - - public static void DrawString( - this SpriteBatch spriteBatch, - DynamicSpriteFont spriteFont, - StringBuilder text, - Vector2 position, - Color color, - float rotation, - Vector2 origin, - Vector2 scale, - SpriteEffects effects, - float layerDepth) - { - spriteFont.InternalDraw(text.ToString(), spriteBatch, position, color, rotation, origin, ref scale, effects, layerDepth); - } - } -} diff --git a/Src/ReLogic/Graphics/DynamicSpriteFontReader.cs b/Src/ReLogic/Graphics/DynamicSpriteFontReader.cs deleted file mode 100644 index 69bd52a6..00000000 --- a/Src/ReLogic/Graphics/DynamicSpriteFontReader.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Graphics.DynamicSpriteFontReader -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Content; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; - -namespace ReLogic.Graphics -{ - public class DynamicSpriteFontReader : ContentTypeReader - { - protected override DynamicSpriteFont Read( - ContentReader input, - DynamicSpriteFont existingInstance) - { - double spacing = (double) input.ReadSingle(); - int num = input.ReadInt32(); - char ch = input.ReadChar(); - int lineSpacing = num; - int defaultCharacter = (int) ch; - DynamicSpriteFont dynamicSpriteFont = new DynamicSpriteFont((float) spacing, lineSpacing, (char) defaultCharacter); - int length = input.ReadInt32(); - FontPage[] pages = new FontPage[length]; - for (int index = 0; index < length; ++index) - { - Texture2D texture = input.ReadObject(); - List glyphs = input.ReadObject>(); - List padding = input.ReadObject>(); - List characters = input.ReadObject>(); - List kerning = input.ReadObject>(); - pages[index] = new FontPage(texture, glyphs, padding, characters, kerning); - } - dynamicSpriteFont.SetPages(pages); - return dynamicSpriteFont; - } - } -} diff --git a/Src/ReLogic/Graphics/FontPage.cs b/Src/ReLogic/Graphics/FontPage.cs deleted file mode 100644 index 4469803f..00000000 --- a/Src/ReLogic/Graphics/FontPage.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Graphics.FontPage -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; - -namespace ReLogic.Graphics -{ - internal sealed class FontPage - { - public readonly Texture2D Texture; - public readonly List Glyphs; - public readonly List Padding; - public readonly List Characters; - public readonly List Kerning; - - public FontPage( - Texture2D texture, - List glyphs, - List padding, - List characters, - List kerning) - { - this.Texture = texture; - this.Glyphs = glyphs; - this.Padding = padding; - this.Characters = characters; - this.Kerning = kerning; - } - } -} diff --git a/Src/ReLogic/IO/ConsoleOutputMirror.cs b/Src/ReLogic/IO/ConsoleOutputMirror.cs deleted file mode 100644 index bbace63a..00000000 --- a/Src/ReLogic/IO/ConsoleOutputMirror.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.IO.ConsoleOutputMirror -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.IO; -using System.Text; - -namespace ReLogic.IO -{ - public class ConsoleOutputMirror : IDisposable - { - private static ConsoleOutputMirror _instance; - private FileStream _fileStream; - private StreamWriter _fileWriter; - private TextWriter _newConsoleOutput; - private TextWriter _oldConsoleOutput; - private bool disposedValue; - - public static void ToFile(string path) - { - if (ConsoleOutputMirror._instance != null) - { - ConsoleOutputMirror._instance.Dispose(); - ConsoleOutputMirror._instance = (ConsoleOutputMirror) null; - } - try - { - ConsoleOutputMirror._instance = new ConsoleOutputMirror(path); - } - catch (Exception ex) - { - Console.WriteLine("Unable to bind console output to file: {0}\r\nException: {1}", (object) path, (object) ex.ToString()); - } - } - - private ConsoleOutputMirror(string path) - { - this._oldConsoleOutput = Console.Out; - Directory.CreateDirectory(Directory.GetParent(path).FullName); - this._fileStream = File.Create(path); - this._fileWriter = new StreamWriter((Stream) this._fileStream) - { - AutoFlush = true - }; - this._newConsoleOutput = (TextWriter) new ConsoleOutputMirror.DoubleWriter((TextWriter) this._fileWriter, this._oldConsoleOutput); - Console.SetOut(this._newConsoleOutput); - } - - protected virtual void Dispose(bool disposing) - { - if (this.disposedValue) - return; - if (disposing) - { - Console.SetOut(this._oldConsoleOutput); - if (this._fileWriter != null) - { - this._fileWriter.Flush(); - this._fileWriter.Close(); - this._fileWriter = (StreamWriter) null; - } - if (this._fileStream != null) - { - this._fileStream.Close(); - this._fileStream = (FileStream) null; - } - } - this.disposedValue = true; - } - - public void Dispose() => this.Dispose(true); - - private class DoubleWriter : TextWriter - { - private TextWriter _first; - private TextWriter _second; - - public DoubleWriter(TextWriter first, TextWriter second) - { - this._first = first; - this._second = second; - } - - public override Encoding Encoding => this._first.Encoding; - - public override void Flush() - { - this._first.Flush(); - this._second.Flush(); - } - - public override void Write(char value) - { - this._first.Write(value); - this._second.Write(value); - } - } - } -} diff --git a/Src/ReLogic/Localization/IME/FnaIme.cs b/Src/ReLogic/Localization/IME/FnaIme.cs deleted file mode 100644 index 4eb3a214..00000000 --- a/Src/ReLogic/Localization/IME/FnaIme.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.FnaIme -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.Localization.IME -{ - internal class FnaIme : PlatformIme - { - private bool _disposedValue; - - private void OnCharCallback(char key) - { - if (!this.IsEnabled || this.OnKeyPress == null) - return; - this.OnKeyPress(key); - } - - public override uint CandidateCount => 0; - - public override string CompositionString => string.Empty; - - public override bool IsCandidateListVisible => false; - - public override uint SelectedCandidate => 0; - - public override string GetCandidate(uint index) => string.Empty; - - protected override void Dispose(bool disposing) - { - if (this._disposedValue) - return; - int num = disposing ? 1 : 0; - if (this.IsEnabled) - this.Disable(); - this._disposedValue = true; - } - - ~FnaIme() => this.Dispose(false); - } -} diff --git a/Src/ReLogic/Localization/IME/PlatformIme.cs b/Src/ReLogic/Localization/IME/PlatformIme.cs deleted file mode 100644 index 755cf75d..00000000 --- a/Src/ReLogic/Localization/IME/PlatformIme.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.PlatformIme -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; - -namespace ReLogic.Localization.IME -{ - public abstract class PlatformIme : IDisposable - { - public Action OnKeyPress; - private bool _disposedValue; - - public abstract string CompositionString { get; } - - public abstract bool IsCandidateListVisible { get; } - - public abstract uint SelectedCandidate { get; } - - public abstract uint CandidateCount { get; } - - public bool IsEnabled { get; private set; } - - public PlatformIme() => this.IsEnabled = false; - - public abstract string GetCandidate(uint index); - - public void Enable() - { - if (this.IsEnabled) - return; - this.OnEnable(); - this.IsEnabled = true; - } - - public void Disable() - { - if (!this.IsEnabled) - return; - this.OnDisable(); - this.IsEnabled = false; - } - - protected virtual void OnEnable() - { - } - - protected virtual void OnDisable() - { - } - - protected virtual void Dispose(bool disposing) - { - if (this._disposedValue) - return; - int num = disposing ? 1 : 0; - this._disposedValue = true; - } - - ~PlatformIme() => this.Dispose(false); - - public void Dispose() - { - this.Dispose(true); - GC.SuppressFinalize((object) this); - } - } -} diff --git a/Src/ReLogic/Localization/IME/UnsupportedPlatformIme.cs b/Src/ReLogic/Localization/IME/UnsupportedPlatformIme.cs deleted file mode 100644 index b7e8bf37..00000000 --- a/Src/ReLogic/Localization/IME/UnsupportedPlatformIme.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.UnsupportedPlatformIme -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.Localization.IME -{ - public class UnsupportedPlatformIme : PlatformIme - { - public override uint CandidateCount => 0; - - public override string CompositionString => string.Empty; - - public override bool IsCandidateListVisible => false; - - public override uint SelectedCandidate => 0; - - public override string GetCandidate(uint index) => string.Empty; - } -} diff --git a/Src/ReLogic/Localization/IME/Windows/ImeUi.cs b/Src/ReLogic/Localization/IME/Windows/ImeUi.cs deleted file mode 100644 index 55dfdc31..00000000 --- a/Src/ReLogic/Localization/IME/Windows/ImeUi.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.Windows.ImeUi -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ReLogic.Localization.IME.Windows -{ - internal static class ImeUi - { - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_Initialize", CharSet = CharSet.Unicode)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool Initialize(IntPtr hWnd, [MarshalAs(UnmanagedType.I1)] bool bDisabled = false); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_Uninitialize", CharSet = CharSet.Unicode)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool Uninitialize(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_EnableIme", CharSet = CharSet.Unicode)] - public static extern void Enable([MarshalAs(UnmanagedType.I1)] bool bEnable); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_IsEnabled", CharSet = CharSet.Unicode)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool IsEnabled(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_ProcessMessage", CharSet = CharSet.Unicode)] - public static extern IntPtr ProcessMessage( - IntPtr hWnd, - int msg, - IntPtr wParam, - ref IntPtr lParam, - [MarshalAs(UnmanagedType.I1)] ref bool trapped); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_GetCompositionString", CharSet = CharSet.Unicode)] - public static extern IntPtr GetCompositionString(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_GetCandidate", CharSet = CharSet.Unicode)] - public static extern IntPtr GetCandidate(uint index); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_GetCandidateSelection", CharSet = CharSet.Unicode)] - public static extern uint GetCandidateSelection(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_GetCandidateCount", CharSet = CharSet.Unicode)] - public static extern uint GetCandidateCount(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_FinalizeString", CharSet = CharSet.Unicode)] - public static extern void FinalizeString([MarshalAs(UnmanagedType.I1)] bool bSend = false); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_GetCandidatePageSize", CharSet = CharSet.Unicode)] - public static extern uint GetCandidatePageSize(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_IsShowCandListWindow", CharSet = CharSet.Unicode)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool IsCandidateListVisible(); - - [DllImport("ReLogic.Native.dll", EntryPoint = "ImeUi_IgnoreHotKey", CharSet = CharSet.Unicode)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ShouldIgnoreHotKey(ref Message message); - - public struct LanguageId - { - public static readonly ImeUi.LanguageId None = new ImeUi.LanguageId() - { - _id = IntPtr.Zero - }; - private IntPtr _id; - - public ushort Id => (ushort) (this._id.ToInt32() & (int) ushort.MaxValue); - - public ushort Primary => (ushort) ((uint) this.Id & 1023U); - - public ushort Sub => (ushort) ((uint) this.Id >> 10); - - public override bool Equals(object obj) => obj is ImeUi.LanguageId languageId && this == languageId; - - public override int GetHashCode() => this._id.GetHashCode(); - - public static bool operator ==(ImeUi.LanguageId lhs, ImeUi.LanguageId rhs) => lhs._id == rhs._id; - - public static bool operator !=(ImeUi.LanguageId lhs, ImeUi.LanguageId rhs) => lhs._id != rhs._id; - } - } -} diff --git a/Src/ReLogic/Localization/IME/Windows/Imm.cs b/Src/ReLogic/Localization/IME/Windows/Imm.cs deleted file mode 100644 index 7d0e3076..00000000 --- a/Src/ReLogic/Localization/IME/Windows/Imm.cs +++ /dev/null @@ -1,440 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.Windows.Imm -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.Localization.IME.Windows -{ - internal static class Imm - { - public const int ISC_SHOWUICANDIDATEWINDOW = 1; - public const int ISC_SHOWUICOMPOSITIONWINDOW = -2147483648; - public const int ISC_SHOWUIGUIDELINE = 1073741824; - public const int ISC_SHOWUIALLCANDIDATEWINDOW = 15; - public const int ISC_SHOWUIALL = -1073741809; - public const uint GCS_COMPREADSTR = 1; - public const uint GCS_COMPREADATTR = 2; - public const uint GCS_COMPREADCLAUSE = 4; - public const uint GCS_COMPSTR = 8; - public const uint GCS_COMPATTR = 16; - public const uint GCS_COMPCLAUSE = 32; - public const uint GCS_CURSORPOS = 128; - public const uint GCS_DELTASTART = 256; - public const uint GCS_RESULTREADSTR = 512; - public const uint GCS_RESULTREADCLAUSE = 1024; - public const uint GCS_RESULTSTR = 2048; - public const uint GCS_RESULTCLAUSE = 4096; - public const int IMN_CLOSESTATUSWINDOW = 1; - public const int IMN_OPENSTATUSWINDOW = 2; - public const int IMN_CHANGECANDIDATE = 3; - public const int IMN_CLOSECANDIDATE = 4; - public const int IMN_OPENCANDIDATE = 5; - public const int IMN_SETCONVERSIONMODE = 6; - public const int IMN_SETSENTENCEMODE = 7; - public const int IMN_SETOPENSTATUS = 8; - public const int IMN_SETCANDIDATEPOS = 9; - public const int IMN_SETCOMPOSITIONFONT = 10; - public const int IMN_SETCOMPOSITIONWINDOW = 11; - public const int IMN_SETSTATUSWINDOWPOS = 12; - public const int IMN_GUIDELINE = 13; - public const int IMN_PRIVATE = 14; - public const int IMC_GETCANDIDATEPOS = 7; - public const int IMC_SETCANDIDATEPOS = 8; - public const int IMC_GETCOMPOSITIONFONT = 9; - public const int IMC_SETCOMPOSITIONFONT = 10; - public const int IMC_GETCOMPOSITIONWINDOW = 11; - public const int IMC_SETCOMPOSITIONWINDOW = 12; - public const int IMC_GETSTATUSWINDOWPOS = 15; - public const int IMC_SETSTATUSWINDOWPOS = 16; - public const int IMC_CLOSESTATUSWINDOW = 33; - public const int IMC_OPENSTATUSWINDOW = 34; - public const int WA_INACTIVE = 0; - public const int WA_ACTIVE = 1; - public const int WA_CLICKACTIVE = 2; - public const ushort LANG_NEUTRAL = 0; - public const ushort LANG_INVARIANT = 127; - public const ushort LANG_AFRIKAANS = 54; - public const ushort LANG_ALBANIAN = 28; - public const ushort LANG_ALSATIAN = 132; - public const ushort LANG_AMHARIC = 94; - public const ushort LANG_ARABIC = 1; - public const ushort LANG_ARMENIAN = 43; - public const ushort LANG_ASSAMESE = 77; - public const ushort LANG_AZERI = 44; - public const ushort LANG_AZERBAIJANI = 44; - public const ushort LANG_BANGLA = 69; - public const ushort LANG_BASHKIR = 109; - public const ushort LANG_BASQUE = 45; - public const ushort LANG_BELARUSIAN = 35; - public const ushort LANG_BENGALI = 69; - public const ushort LANG_BRETON = 126; - public const ushort LANG_BOSNIAN = 26; - public const ushort LANG_BOSNIAN_NEUTRAL = 30746; - public const ushort LANG_BULGARIAN = 2; - public const ushort LANG_CATALAN = 3; - public const ushort LANG_CENTRAL_KURDISH = 146; - public const ushort LANG_CHEROKEE = 92; - public const ushort LANG_CHINESE = 4; - public const ushort LANG_CHINESE_SIMPLIFIED = 4; - public const ushort LANG_CHINESE_TRADITIONAL = 31748; - public const ushort LANG_CORSICAN = 131; - public const ushort LANG_CROATIAN = 26; - public const ushort LANG_CZECH = 5; - public const ushort LANG_DANISH = 6; - public const ushort LANG_DARI = 140; - public const ushort LANG_DIVEHI = 101; - public const ushort LANG_DUTCH = 19; - public const ushort LANG_ENGLISH = 9; - public const ushort LANG_ESTONIAN = 37; - public const ushort LANG_FAEROESE = 56; - public const ushort LANG_FARSI = 41; - public const ushort LANG_FILIPINO = 100; - public const ushort LANG_FINNISH = 11; - public const ushort LANG_FRENCH = 12; - public const ushort LANG_FRISIAN = 98; - public const ushort LANG_FULAH = 103; - public const ushort LANG_GALICIAN = 86; - public const ushort LANG_GEORGIAN = 55; - public const ushort LANG_GERMAN = 7; - public const ushort LANG_GREEK = 8; - public const ushort LANG_GREENLANDIC = 111; - public const ushort LANG_GUJARATI = 71; - public const ushort LANG_HAUSA = 104; - public const ushort LANG_HAWAIIAN = 117; - public const ushort LANG_HEBREW = 13; - public const ushort LANG_HINDI = 57; - public const ushort LANG_HUNGARIAN = 14; - public const ushort LANG_ICELANDIC = 15; - public const ushort LANG_IGBO = 112; - public const ushort LANG_INDONESIAN = 33; - public const ushort LANG_INUKTITUT = 93; - public const ushort LANG_IRISH = 60; - public const ushort LANG_ITALIAN = 16; - public const ushort LANG_JAPANESE = 17; - public const ushort LANG_KANNADA = 75; - public const ushort LANG_KASHMIRI = 96; - public const ushort LANG_KAZAK = 63; - public const ushort LANG_KHMER = 83; - public const ushort LANG_KICHE = 134; - public const ushort LANG_KINYARWANDA = 135; - public const ushort LANG_KONKANI = 87; - public const ushort LANG_KOREAN = 18; - public const ushort LANG_KYRGYZ = 64; - public const ushort LANG_LAO = 84; - public const ushort LANG_LATVIAN = 38; - public const ushort LANG_LITHUANIAN = 39; - public const ushort LANG_LOWER_SORBIAN = 46; - public const ushort LANG_LUXEMBOURGISH = 110; - public const ushort LANG_MACEDONIAN = 47; - public const ushort LANG_MALAY = 62; - public const ushort LANG_MALAYALAM = 76; - public const ushort LANG_MALTESE = 58; - public const ushort LANG_MANIPURI = 88; - public const ushort LANG_MAORI = 129; - public const ushort LANG_MAPUDUNGUN = 122; - public const ushort LANG_MARATHI = 78; - public const ushort LANG_MOHAWK = 124; - public const ushort LANG_MONGOLIAN = 80; - public const ushort LANG_NEPALI = 97; - public const ushort LANG_NORWEGIAN = 20; - public const ushort LANG_OCCITAN = 130; - public const ushort LANG_ODIA = 72; - public const ushort LANG_ORIYA = 72; - public const ushort LANG_PASHTO = 99; - public const ushort LANG_PERSIAN = 41; - public const ushort LANG_POLISH = 21; - public const ushort LANG_PORTUGUESE = 22; - public const ushort LANG_PULAR = 103; - public const ushort LANG_PUNJABI = 70; - public const ushort LANG_QUECHUA = 107; - public const ushort LANG_ROMANIAN = 24; - public const ushort LANG_ROMANSH = 23; - public const ushort LANG_RUSSIAN = 25; - public const ushort LANG_SAKHA = 133; - public const ushort LANG_SAMI = 59; - public const ushort LANG_SANSKRIT = 79; - public const ushort LANG_SCOTTISH_GAELIC = 145; - public const ushort LANG_SERBIAN = 26; - public const ushort LANG_SERBIAN_NEUTRAL = 31770; - public const ushort LANG_SINDHI = 89; - public const ushort LANG_SINHALESE = 91; - public const ushort LANG_SLOVAK = 27; - public const ushort LANG_SLOVENIAN = 36; - public const ushort LANG_SOTHO = 108; - public const ushort LANG_SPANISH = 10; - public const ushort LANG_SWAHILI = 65; - public const ushort LANG_SWEDISH = 29; - public const ushort LANG_SYRIAC = 90; - public const ushort LANG_TAJIK = 40; - public const ushort LANG_TAMAZIGHT = 95; - public const ushort LANG_TAMIL = 73; - public const ushort LANG_TATAR = 68; - public const ushort LANG_TELUGU = 74; - public const ushort LANG_THAI = 30; - public const ushort LANG_TIBETAN = 81; - public const ushort LANG_TIGRIGNA = 115; - public const ushort LANG_TIGRINYA = 115; - public const ushort LANG_TSWANA = 50; - public const ushort LANG_TURKISH = 31; - public const ushort LANG_TURKMEN = 66; - public const ushort LANG_UIGHUR = 128; - public const ushort LANG_UKRAINIAN = 34; - public const ushort LANG_UPPER_SORBIAN = 46; - public const ushort LANG_URDU = 32; - public const ushort LANG_UZBEK = 67; - public const ushort LANG_VALENCIAN = 3; - public const ushort LANG_VIETNAMESE = 42; - public const ushort LANG_WELSH = 82; - public const ushort LANG_WOLOF = 136; - public const ushort LANG_XHOSA = 52; - public const ushort LANG_YAKUT = 133; - public const ushort LANG_YI = 120; - public const ushort LANG_YORUBA = 106; - public const ushort LANG_ZULU = 53; - public const ushort SUBLANG_NEUTRAL = 0; - public const ushort SUBLANG_DEFAULT = 1; - public const ushort SUBLANG_SYS_DEFAULT = 2; - public const ushort SUBLANG_CUSTOM_DEFAULT = 3; - public const ushort SUBLANG_CUSTOM_UNSPECIFIED = 4; - public const ushort SUBLANG_UI_CUSTOM_DEFAULT = 5; - public const ushort SUBLANG_AFRIKAANS_SOUTH_AFRICA = 1; - public const ushort SUBLANG_ALBANIAN_ALBANIA = 1; - public const ushort SUBLANG_ALSATIAN_FRANCE = 1; - public const ushort SUBLANG_AMHARIC_ETHIOPIA = 1; - public const ushort SUBLANG_ARABIC_SAUDI_ARABIA = 1; - public const ushort SUBLANG_ARABIC_IRAQ = 2; - public const ushort SUBLANG_ARABIC_EGYPT = 3; - public const ushort SUBLANG_ARABIC_LIBYA = 4; - public const ushort SUBLANG_ARABIC_ALGERIA = 5; - public const ushort SUBLANG_ARABIC_MOROCCO = 6; - public const ushort SUBLANG_ARABIC_TUNISIA = 7; - public const ushort SUBLANG_ARABIC_OMAN = 8; - public const ushort SUBLANG_ARABIC_YEMEN = 9; - public const ushort SUBLANG_ARABIC_SYRIA = 10; - public const ushort SUBLANG_ARABIC_JORDAN = 11; - public const ushort SUBLANG_ARABIC_LEBANON = 12; - public const ushort SUBLANG_ARABIC_KUWAIT = 13; - public const ushort SUBLANG_ARABIC_UAE = 14; - public const ushort SUBLANG_ARABIC_BAHRAIN = 15; - public const ushort SUBLANG_ARABIC_QATAR = 16; - public const ushort SUBLANG_ARMENIAN_ARMENIA = 1; - public const ushort SUBLANG_ASSAMESE_INDIA = 1; - public const ushort SUBLANG_AZERI_LATIN = 1; - public const ushort SUBLANG_AZERI_CYRILLIC = 2; - public const ushort SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN = 1; - public const ushort SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC = 2; - public const ushort SUBLANG_BANGLA_INDIA = 1; - public const ushort SUBLANG_BANGLA_BANGLADESH = 2; - public const ushort SUBLANG_BASHKIR_RUSSIA = 1; - public const ushort SUBLANG_BASQUE_BASQUE = 1; - public const ushort SUBLANG_BELARUSIAN_BELARUS = 1; - public const ushort SUBLANG_BENGALI_INDIA = 1; - public const ushort SUBLANG_BENGALI_BANGLADESH = 2; - public const ushort SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 5; - public const ushort SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 8; - public const ushort SUBLANG_BRETON_FRANCE = 1; - public const ushort SUBLANG_BULGARIAN_BULGARIA = 1; - public const ushort SUBLANG_CATALAN_CATALAN = 1; - public const ushort SUBLANG_CENTRAL_KURDISH_IRAQ = 1; - public const ushort SUBLANG_CHEROKEE_CHEROKEE = 1; - public const ushort SUBLANG_CHINESE_TRADITIONAL = 1; - public const ushort SUBLANG_CHINESE_SIMPLIFIED = 2; - public const ushort SUBLANG_CHINESE_HONGKONG = 3; - public const ushort SUBLANG_CHINESE_SINGAPORE = 4; - public const ushort SUBLANG_CHINESE_MACAU = 5; - public const ushort SUBLANG_CORSICAN_FRANCE = 1; - public const ushort SUBLANG_CZECH_CZECH_REPUBLIC = 1; - public const ushort SUBLANG_CROATIAN_CROATIA = 1; - public const ushort SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 4; - public const ushort SUBLANG_DANISH_DENMARK = 1; - public const ushort SUBLANG_DARI_AFGHANISTAN = 1; - public const ushort SUBLANG_DIVEHI_MALDIVES = 1; - public const ushort SUBLANG_DUTCH = 1; - public const ushort SUBLANG_DUTCH_BELGIAN = 2; - public const ushort SUBLANG_ENGLISH_US = 1; - public const ushort SUBLANG_ENGLISH_UK = 2; - public const ushort SUBLANG_ENGLISH_AUS = 3; - public const ushort SUBLANG_ENGLISH_CAN = 4; - public const ushort SUBLANG_ENGLISH_NZ = 5; - public const ushort SUBLANG_ENGLISH_EIRE = 6; - public const ushort SUBLANG_ENGLISH_SOUTH_AFRICA = 7; - public const ushort SUBLANG_ENGLISH_JAMAICA = 8; - public const ushort SUBLANG_ENGLISH_CARIBBEAN = 9; - public const ushort SUBLANG_ENGLISH_BELIZE = 10; - public const ushort SUBLANG_ENGLISH_TRINIDAD = 11; - public const ushort SUBLANG_ENGLISH_ZIMBABWE = 12; - public const ushort SUBLANG_ENGLISH_PHILIPPINES = 13; - public const ushort SUBLANG_ENGLISH_INDIA = 16; - public const ushort SUBLANG_ENGLISH_MALAYSIA = 17; - public const ushort SUBLANG_ENGLISH_SINGAPORE = 18; - public const ushort SUBLANG_ESTONIAN_ESTONIA = 1; - public const ushort SUBLANG_FAEROESE_FAROE_ISLANDS = 1; - public const ushort SUBLANG_FILIPINO_PHILIPPINES = 1; - public const ushort SUBLANG_FINNISH_FINLAND = 1; - public const ushort SUBLANG_FRENCH = 1; - public const ushort SUBLANG_FRENCH_BELGIAN = 2; - public const ushort SUBLANG_FRENCH_CANADIAN = 3; - public const ushort SUBLANG_FRENCH_SWISS = 4; - public const ushort SUBLANG_FRENCH_LUXEMBOURG = 5; - public const ushort SUBLANG_FRENCH_MONACO = 6; - public const ushort SUBLANG_FRISIAN_NETHERLANDS = 1; - public const ushort SUBLANG_FULAH_SENEGAL = 2; - public const ushort SUBLANG_GALICIAN_GALICIAN = 1; - public const ushort SUBLANG_GEORGIAN_GEORGIA = 1; - public const ushort SUBLANG_GERMAN = 1; - public const ushort SUBLANG_GERMAN_SWISS = 2; - public const ushort SUBLANG_GERMAN_AUSTRIAN = 3; - public const ushort SUBLANG_GERMAN_LUXEMBOURG = 4; - public const ushort SUBLANG_GERMAN_LIECHTENSTEIN = 5; - public const ushort SUBLANG_GREEK_GREECE = 1; - public const ushort SUBLANG_GREENLANDIC_GREENLAND = 1; - public const ushort SUBLANG_GUJARATI_INDIA = 1; - public const ushort SUBLANG_HAUSA_NIGERIA_LATIN = 1; - public const ushort SUBLANG_HAWAIIAN_US = 1; - public const ushort SUBLANG_HEBREW_ISRAEL = 1; - public const ushort SUBLANG_HINDI_INDIA = 1; - public const ushort SUBLANG_HUNGARIAN_HUNGARY = 1; - public const ushort SUBLANG_ICELANDIC_ICELAND = 1; - public const ushort SUBLANG_IGBO_NIGERIA = 1; - public const ushort SUBLANG_INDONESIAN_INDONESIA = 1; - public const ushort SUBLANG_INUKTITUT_CANADA = 1; - public const ushort SUBLANG_INUKTITUT_CANADA_LATIN = 2; - public const ushort SUBLANG_IRISH_IRELAND = 2; - public const ushort SUBLANG_ITALIAN = 1; - public const ushort SUBLANG_ITALIAN_SWISS = 2; - public const ushort SUBLANG_JAPANESE_JAPAN = 1; - public const ushort SUBLANG_KANNADA_INDIA = 1; - public const ushort SUBLANG_KASHMIRI_SASIA = 2; - public const ushort SUBLANG_KASHMIRI_INDIA = 2; - public const ushort SUBLANG_KAZAK_KAZAKHSTAN = 1; - public const ushort SUBLANG_KHMER_CAMBODIA = 1; - public const ushort SUBLANG_KICHE_GUATEMALA = 1; - public const ushort SUBLANG_KINYARWANDA_RWANDA = 1; - public const ushort SUBLANG_KONKANI_INDIA = 1; - public const ushort SUBLANG_KOREAN = 1; - public const ushort SUBLANG_KYRGYZ_KYRGYZSTAN = 1; - public const ushort SUBLANG_LAO_LAO = 1; - public const ushort SUBLANG_LATVIAN_LATVIA = 1; - public const ushort SUBLANG_LITHUANIAN = 1; - public const ushort SUBLANG_LOWER_SORBIAN_GERMANY = 2; - public const ushort SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 1; - public const ushort SUBLANG_MACEDONIAN_MACEDONIA = 1; - public const ushort SUBLANG_MALAY_MALAYSIA = 1; - public const ushort SUBLANG_MALAY_BRUNEI_DARUSSALAM = 2; - public const ushort SUBLANG_MALAYALAM_INDIA = 1; - public const ushort SUBLANG_MALTESE_MALTA = 1; - public const ushort SUBLANG_MAORI_NEW_ZEALAND = 1; - public const ushort SUBLANG_MAPUDUNGUN_CHILE = 1; - public const ushort SUBLANG_MARATHI_INDIA = 1; - public const ushort SUBLANG_MOHAWK_MOHAWK = 1; - public const ushort SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 1; - public const ushort SUBLANG_MONGOLIAN_PRC = 2; - public const ushort SUBLANG_NEPALI_INDIA = 2; - public const ushort SUBLANG_NEPALI_NEPAL = 1; - public const ushort SUBLANG_NORWEGIAN_BOKMAL = 1; - public const ushort SUBLANG_NORWEGIAN_NYNORSK = 2; - public const ushort SUBLANG_OCCITAN_FRANCE = 1; - public const ushort SUBLANG_ODIA_INDIA = 1; - public const ushort SUBLANG_ORIYA_INDIA = 1; - public const ushort SUBLANG_PASHTO_AFGHANISTAN = 1; - public const ushort SUBLANG_PERSIAN_IRAN = 1; - public const ushort SUBLANG_POLISH_POLAND = 1; - public const ushort SUBLANG_PORTUGUESE = 2; - public const ushort SUBLANG_PORTUGUESE_BRAZILIAN = 1; - public const ushort SUBLANG_PULAR_SENEGAL = 2; - public const ushort SUBLANG_PUNJABI_INDIA = 1; - public const ushort SUBLANG_PUNJABI_PAKISTAN = 2; - public const ushort SUBLANG_QUECHUA_BOLIVIA = 1; - public const ushort SUBLANG_QUECHUA_ECUADOR = 2; - public const ushort SUBLANG_QUECHUA_PERU = 3; - public const ushort SUBLANG_ROMANIAN_ROMANIA = 1; - public const ushort SUBLANG_ROMANSH_SWITZERLAND = 1; - public const ushort SUBLANG_RUSSIAN_RUSSIA = 1; - public const ushort SUBLANG_SAKHA_RUSSIA = 1; - public const ushort SUBLANG_SAMI_NORTHERN_NORWAY = 1; - public const ushort SUBLANG_SAMI_NORTHERN_SWEDEN = 2; - public const ushort SUBLANG_SAMI_NORTHERN_FINLAND = 3; - public const ushort SUBLANG_SAMI_LULE_NORWAY = 4; - public const ushort SUBLANG_SAMI_LULE_SWEDEN = 5; - public const ushort SUBLANG_SAMI_SOUTHERN_NORWAY = 6; - public const ushort SUBLANG_SAMI_SOUTHERN_SWEDEN = 7; - public const ushort SUBLANG_SAMI_SKOLT_FINLAND = 8; - public const ushort SUBLANG_SAMI_INARI_FINLAND = 9; - public const ushort SUBLANG_SANSKRIT_INDIA = 1; - public const ushort SUBLANG_SCOTTISH_GAELIC = 1; - public const ushort SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 6; - public const ushort SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 7; - public const ushort SUBLANG_SERBIAN_MONTENEGRO_LATIN = 11; - public const ushort SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC = 12; - public const ushort SUBLANG_SERBIAN_SERBIA_LATIN = 9; - public const ushort SUBLANG_SERBIAN_SERBIA_CYRILLIC = 10; - public const ushort SUBLANG_SERBIAN_CROATIA = 1; - public const ushort SUBLANG_SERBIAN_LATIN = 2; - public const ushort SUBLANG_SERBIAN_CYRILLIC = 3; - public const ushort SUBLANG_SINDHI_INDIA = 1; - public const ushort SUBLANG_SINDHI_PAKISTAN = 2; - public const ushort SUBLANG_SINDHI_AFGHANISTAN = 2; - public const ushort SUBLANG_SINHALESE_SRI_LANKA = 1; - public const ushort SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 1; - public const ushort SUBLANG_SLOVAK_SLOVAKIA = 1; - public const ushort SUBLANG_SLOVENIAN_SLOVENIA = 1; - public const ushort SUBLANG_SPANISH = 1; - public const ushort SUBLANG_SPANISH_MEXICAN = 2; - public const ushort SUBLANG_SPANISH_MODERN = 3; - public const ushort SUBLANG_SPANISH_GUATEMALA = 4; - public const ushort SUBLANG_SPANISH_COSTA_RICA = 5; - public const ushort SUBLANG_SPANISH_PANAMA = 6; - public const ushort SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 7; - public const ushort SUBLANG_SPANISH_VENEZUELA = 8; - public const ushort SUBLANG_SPANISH_COLOMBIA = 9; - public const ushort SUBLANG_SPANISH_PERU = 10; - public const ushort SUBLANG_SPANISH_ARGENTINA = 11; - public const ushort SUBLANG_SPANISH_ECUADOR = 12; - public const ushort SUBLANG_SPANISH_CHILE = 13; - public const ushort SUBLANG_SPANISH_URUGUAY = 14; - public const ushort SUBLANG_SPANISH_PARAGUAY = 15; - public const ushort SUBLANG_SPANISH_BOLIVIA = 16; - public const ushort SUBLANG_SPANISH_EL_SALVADOR = 17; - public const ushort SUBLANG_SPANISH_HONDURAS = 18; - public const ushort SUBLANG_SPANISH_NICARAGUA = 19; - public const ushort SUBLANG_SPANISH_PUERTO_RICO = 20; - public const ushort SUBLANG_SPANISH_US = 21; - public const ushort SUBLANG_SWAHILI_KENYA = 1; - public const ushort SUBLANG_SWEDISH = 1; - public const ushort SUBLANG_SWEDISH_FINLAND = 2; - public const ushort SUBLANG_SYRIAC_SYRIA = 1; - public const ushort SUBLANG_TAJIK_TAJIKISTAN = 1; - public const ushort SUBLANG_TAMAZIGHT_ALGERIA_LATIN = 2; - public const ushort SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH = 4; - public const ushort SUBLANG_TAMIL_INDIA = 1; - public const ushort SUBLANG_TAMIL_SRI_LANKA = 2; - public const ushort SUBLANG_TATAR_RUSSIA = 1; - public const ushort SUBLANG_TELUGU_INDIA = 1; - public const ushort SUBLANG_THAI_THAILAND = 1; - public const ushort SUBLANG_TIBETAN_PRC = 1; - public const ushort SUBLANG_TIGRIGNA_ERITREA = 2; - public const ushort SUBLANG_TIGRINYA_ERITREA = 2; - public const ushort SUBLANG_TIGRINYA_ETHIOPIA = 1; - public const ushort SUBLANG_TSWANA_BOTSWANA = 2; - public const ushort SUBLANG_TSWANA_SOUTH_AFRICA = 1; - public const ushort SUBLANG_TURKISH_TURKEY = 1; - public const ushort SUBLANG_TURKMEN_TURKMENISTAN = 1; - public const ushort SUBLANG_UIGHUR_PRC = 1; - public const ushort SUBLANG_UKRAINIAN_UKRAINE = 1; - public const ushort SUBLANG_UPPER_SORBIAN_GERMANY = 1; - public const ushort SUBLANG_URDU_PAKISTAN = 1; - public const ushort SUBLANG_URDU_INDIA = 2; - public const ushort SUBLANG_UZBEK_LATIN = 1; - public const ushort SUBLANG_UZBEK_CYRILLIC = 2; - public const ushort SUBLANG_VALENCIAN_VALENCIA = 2; - public const ushort SUBLANG_VIETNAMESE_VIETNAM = 1; - public const ushort SUBLANG_WELSH_UNITED_KINGDOM = 1; - public const ushort SUBLANG_WOLOF_SENEGAL = 1; - public const ushort SUBLANG_XHOSA_SOUTH_AFRICA = 1; - public const ushort SUBLANG_YAKUT_RUSSIA = 1; - public const ushort SUBLANG_YI_PRC = 1; - public const ushort SUBLANG_YORUBA_NIGERIA = 1; - public const ushort SUBLANG_ZULU_SOUTH_AFRICA = 1; - } -} diff --git a/Src/ReLogic/Localization/IME/Windows/ImmNative.cs b/Src/ReLogic/Localization/IME/Windows/ImmNative.cs deleted file mode 100644 index 60dfd625..00000000 --- a/Src/ReLogic/Localization/IME/Windows/ImmNative.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.Windows.ImmNative -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ReLogic.Localization.IME.Windows -{ - internal static class ImmNative - { - [DllImport("user32.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool TranslateMessage(ref Message message); - - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - public static extern IntPtr GetForegroundWindow(); - } -} diff --git a/Src/ReLogic/Localization/IME/WindowsIme.cs b/Src/ReLogic/Localization/IME/WindowsIme.cs deleted file mode 100644 index d95ab3c1..00000000 --- a/Src/ReLogic/Localization/IME/WindowsIme.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Localization.IME.WindowsIme -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using ReLogic.Localization.IME.Windows; -using ReLogic.OS.Windows; -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ReLogic.Localization.IME -{ - internal class WindowsIme : PlatformIme, IMessageFilter - { - private IntPtr _windowHandle; - private bool _isFocused; - private WindowsMessageHook _wndProcHook; - private bool _disposedValue; - - public override string CompositionString => Marshal.PtrToStringUni(ImeUi.GetCompositionString()).ToString(); - - public override bool IsCandidateListVisible => ImeUi.IsCandidateListVisible(); - - public override uint SelectedCandidate => ImeUi.GetCandidateSelection(); - - public override uint CandidateCount => ImeUi.GetCandidatePageSize(); - - public WindowsIme(WindowsMessageHook wndProcHook, IntPtr windowHandle) - { - this._wndProcHook = wndProcHook; - this._windowHandle = windowHandle; - this._isFocused = ImmNative.GetForegroundWindow() == this._windowHandle; - this._wndProcHook.AddMessageFilter((IMessageFilter) this); - ImeUi.Initialize(this._windowHandle); - } - - protected override void OnEnable() - { - if (!this._isFocused) - return; - ImeUi.Enable(true); - } - - protected override void OnDisable() - { - ImeUi.FinalizeString(); - ImeUi.Enable(false); - } - - public override string GetCandidate(uint index) => Marshal.PtrToStringUni(ImeUi.GetCandidate(index)); - - public bool PreFilterMessage(ref Message message) - { - if (message.Msg == 8) - { - ImeUi.Enable(false); - this._isFocused = false; - return true; - } - if (message.Msg == 7) - { - if (this.IsEnabled) - ImeUi.Enable(true); - this._isFocused = true; - return true; - } - if (!this.IsEnabled) - return false; - bool trapped = false; - IntPtr lparam = message.LParam; - ImeUi.ProcessMessage(message.HWnd, message.Msg, message.WParam, ref lparam, ref trapped); - message.LParam = lparam; - if (trapped) - return true; - switch (message.Msg) - { - case 81: - return true; - case 256: - if (!ImeUi.ShouldIgnoreHotKey(ref message)) - { - ImmNative.TranslateMessage(ref message); - break; - } - break; - case 258: - if (this.OnKeyPress != null) - { - this.OnKeyPress((char) message.WParam.ToInt32()); - break; - } - break; - case 269: - return true; - case 641: - message.LParam = IntPtr.Zero; - break; - case 642: - return true; - } - return false; - } - - protected override void Dispose(bool disposing) - { - if (this._disposedValue) - return; - int num = disposing ? 1 : 0; - if (this.IsEnabled) - this.Disable(); - this._wndProcHook.RemoveMessageFilter((IMessageFilter) this); - ImeUi.Uninitialize(); - this._disposedValue = true; - } - - ~WindowsIme() => this.Dispose(false); - } -} diff --git a/Src/ReLogic/Microsoft/Xna/Framework.RuntimeProfile b/Src/ReLogic/Microsoft/Xna/Framework.RuntimeProfile deleted file mode 100644 index adf83025..00000000 --- a/Src/ReLogic/Microsoft/Xna/Framework.RuntimeProfile +++ /dev/null @@ -1 +0,0 @@ -Windows.v4.0.Reach diff --git a/Src/ReLogic/OS/FnaPlatform.cs b/Src/ReLogic/OS/FnaPlatform.cs deleted file mode 100644 index 3e5d01e9..00000000 --- a/Src/ReLogic/OS/FnaPlatform.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.FnaPlatform -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using ReLogic.Localization.IME; -using System; - -namespace ReLogic.OS -{ - internal abstract class FnaPlatform : Platform - { - public FnaPlatform(PlatformType type) - : base(type) - { - } - - protected override PlatformIme CreateIme(IntPtr windowHandle) => (PlatformIme) new FnaIme(); - } -} diff --git a/Src/ReLogic/OS/LinuxPlatform.cs b/Src/ReLogic/OS/LinuxPlatform.cs deleted file mode 100644 index 74bf03ec..00000000 --- a/Src/ReLogic/OS/LinuxPlatform.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.LinuxPlatform -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Diagnostics; - -namespace ReLogic.OS -{ - internal class LinuxPlatform : FnaPlatform - { - public LinuxPlatform() - : base(PlatformType.Linux) - { - } - - protected override string GetClipboard() - { - try - { - string end; - using (Process process = new Process()) - { - process.StartInfo = new ProcessStartInfo("xsel", "-o") - { - UseShellExecute = false, - RedirectStandardOutput = true - }; - process.Start(); - end = process.StandardOutput.ReadToEnd(); - process.WaitForExit(); - } - return end; - } - catch (Exception ex) - { - return ""; - } - } - - private void ClearClipboard() - { - try - { - using (Process process = new Process()) - { - process.StartInfo = new ProcessStartInfo("xsel", "-c") - { - UseShellExecute = false, - RedirectStandardOutput = false, - RedirectStandardInput = true - }; - process.Start(); - process.WaitForExit(); - } - } - catch (Exception ex) - { - } - } - - protected override void SetClipboard(string text) - { - if (text == "") - { - this.ClearClipboard(); - } - else - { - try - { - using (Process process = new Process()) - { - process.StartInfo = new ProcessStartInfo("xsel", "-i") - { - UseShellExecute = false, - RedirectStandardOutput = false, - RedirectStandardInput = true - }; - process.Start(); - process.StandardInput.Write(text); - process.StandardInput.Close(); - process.WaitForExit(); - } - } - catch (Exception ex) - { - } - } - } - - public override string GetStoragePath() - { - string storagePath = Environment.GetEnvironmentVariable("XDG_DATA_HOME"); - if (string.IsNullOrEmpty(storagePath)) - { - string environmentVariable = Environment.GetEnvironmentVariable("HOME"); - if (string.IsNullOrEmpty(environmentVariable)) - return "."; - storagePath = environmentVariable + "/.local/share"; - } - return storagePath; - } - } -} diff --git a/Src/ReLogic/OS/OsxPlatform.cs b/Src/ReLogic/OS/OsxPlatform.cs deleted file mode 100644 index e19ad8df..00000000 --- a/Src/ReLogic/OS/OsxPlatform.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.OsxPlatform -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Diagnostics; - -namespace ReLogic.OS -{ - internal class OsxPlatform : FnaPlatform - { - public OsxPlatform() - : base(PlatformType.OSX) - { - } - - protected override string GetClipboard() - { - try - { - string end; - using (Process process = new Process()) - { - process.StartInfo = new ProcessStartInfo("pbpaste", "-pboard general") - { - UseShellExecute = false, - RedirectStandardOutput = true - }; - process.Start(); - end = process.StandardOutput.ReadToEnd(); - process.WaitForExit(); - } - return end; - } - catch (Exception ex) - { - return ""; - } - } - - protected override void SetClipboard(string text) - { - try - { - using (Process process = new Process()) - { - process.StartInfo = new ProcessStartInfo("pbcopy", "-pboard general -Prefer txt") - { - UseShellExecute = false, - RedirectStandardOutput = false, - RedirectStandardInput = true - }; - process.Start(); - process.StandardInput.Write(text); - process.StandardInput.Close(); - process.WaitForExit(); - } - } - catch (Exception ex) - { - } - } - - public override string GetStoragePath() - { - string environmentVariable = Environment.GetEnvironmentVariable("HOME"); - return string.IsNullOrEmpty(environmentVariable) ? "." : environmentVariable + "/Library/Application Support"; - } - } -} diff --git a/Src/ReLogic/OS/Platform.cs b/Src/ReLogic/OS/Platform.cs deleted file mode 100644 index f73d028e..00000000 --- a/Src/ReLogic/OS/Platform.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.Platform -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using Microsoft.Xna.Framework; -using ReLogic.Localization.IME; -using System; -using System.IO; -using System.Text; - -namespace ReLogic.OS -{ - public abstract class Platform - { - public static readonly Platform Current = (Platform) new WindowsPlatform(); - public readonly PlatformType Type; - - public static bool IsWindows => Platform.Current.Type == PlatformType.Windows; - - public static bool IsOSX => Platform.Current.Type == PlatformType.OSX; - - public static bool IsLinux => Platform.Current.Type == PlatformType.Linux; - - public PlatformIme Ime { get; private set; } - - public string Clipboard - { - get => Platform.SanitizeClipboardText(this.GetClipboard()); - set => this.SetClipboard(value); - } - - public Platform(PlatformType type) - { - this.Type = type; - this.Ime = (PlatformIme) new UnsupportedPlatformIme(); - } - - public void InitializeIme(IntPtr windowHandle) - { - if (this.Ime != null) - this.Ime.Dispose(); - this.Ime = this.CreateIme(windowHandle); - } - - protected abstract PlatformIme CreateIme(IntPtr windowHandle); - - public string GetStoragePath(string subfolder) => Path.Combine(this.GetStoragePath(), subfolder); - - public abstract string GetStoragePath(); - - protected abstract string GetClipboard(); - - protected abstract void SetClipboard(string text); - - private static string SanitizeClipboardText(string clipboardText) - { - StringBuilder stringBuilder = new StringBuilder(clipboardText.Length); - for (int index = 0; index < clipboardText.Length; ++index) - { - if (clipboardText[index] >= ' ' && clipboardText[index] != '\u007F') - stringBuilder.Append(clipboardText[index]); - } - return stringBuilder.ToString(); - } - - public virtual void SetWindowUnicodeTitle(GameWindow window, string title) => window.Title = title; - } -} diff --git a/Src/ReLogic/OS/PlatformType.cs b/Src/ReLogic/OS/PlatformType.cs deleted file mode 100644 index 8c25c2c9..00000000 --- a/Src/ReLogic/OS/PlatformType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.PlatformType -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.OS -{ - public enum PlatformType - { - Windows, - OSX, - Linux, - } -} diff --git a/Src/ReLogic/OS/Windows/NativeMethods.cs b/Src/ReLogic/OS/Windows/NativeMethods.cs deleted file mode 100644 index fe6428c6..00000000 --- a/Src/ReLogic/OS/Windows/NativeMethods.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.Windows.NativeMethods -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Runtime.InteropServices; - -namespace ReLogic.OS.Windows -{ - internal static class NativeMethods - { - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - public static extern IntPtr SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); - - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - public static extern IntPtr DefWindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); - } -} diff --git a/Src/ReLogic/OS/Windows/STATaskInvoker.cs b/Src/ReLogic/OS/Windows/STATaskInvoker.cs deleted file mode 100644 index f5abe736..00000000 --- a/Src/ReLogic/OS/Windows/STATaskInvoker.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.Windows.STATaskInvoker -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Collections.Concurrent; -using System.Threading; - -namespace ReLogic.OS.Windows -{ - internal class STATaskInvoker : IDisposable - { - private static STATaskInvoker Instance; - private Thread _staThread; - private volatile bool _shouldThreadContinue; - private BlockingCollection _staTasks = new BlockingCollection(); - private object _taskInvokeLock = new object(); - private object _taskCompletionLock = new object(); - private bool disposedValue; - - private STATaskInvoker() - { - this._shouldThreadContinue = true; - this._staThread = new Thread(new ThreadStart(this.TaskThreadStart)); - this._staThread.Name = "STA Invoker Thread"; - this._staThread.SetApartmentState(ApartmentState.STA); - this._staThread.Start(); - } - - public static void Invoke(Action action) - { - if (STATaskInvoker.Instance == null) - STATaskInvoker.Instance = new STATaskInvoker(); - STATaskInvoker.Instance.InvokeAndWait(action); - } - - public static T Invoke(Func action) - { - if (STATaskInvoker.Instance == null) - STATaskInvoker.Instance = new STATaskInvoker(); - T output = default (T); - STATaskInvoker.Instance.InvokeAndWait((Action) (() => output = action())); - return output; - } - - private void InvokeAndWait(Action action) - { - lock (this._taskInvokeLock) - { - lock (this._taskCompletionLock) - { - this._staTasks.Add(action); - Monitor.Wait(this._taskCompletionLock); - } - } - } - - private void TaskThreadStart() - { - while (this._shouldThreadContinue) - { - Action action = this._staTasks.Take(); - lock (this._taskCompletionLock) - { - action(); - Monitor.Pulse(this._taskCompletionLock); - } - } - } - - private void Shutdown() => this.InvokeAndWait((Action) (() => this._shouldThreadContinue = false)); - - protected virtual void Dispose(bool disposing) - { - if (this.disposedValue) - return; - if (disposing) - this.Shutdown(); - this.disposedValue = true; - } - - public void Dispose() => this.Dispose(true); - } -} diff --git a/Src/ReLogic/OS/Windows/WindowsApi.cs b/Src/ReLogic/OS/Windows/WindowsApi.cs deleted file mode 100644 index c7bac613..00000000 --- a/Src/ReLogic/OS/Windows/WindowsApi.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.Windows.WindowsApi -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Runtime.InteropServices; - -namespace ReLogic.OS.Windows -{ - internal static class WindowsApi - { - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - public static extern IntPtr CallWindowProc( - IntPtr lpPrevWndFunc, - IntPtr hWnd, - int msg, - IntPtr wParam, - IntPtr lParam); - - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); - } -} diff --git a/Src/ReLogic/OS/Windows/WindowsMessage.cs b/Src/ReLogic/OS/Windows/WindowsMessage.cs deleted file mode 100644 index 5fd3288a..00000000 --- a/Src/ReLogic/OS/Windows/WindowsMessage.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.Windows.WindowsMessage -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.OS.Windows -{ - internal static class WindowsMessage - { - public const int SETFOCUS = 7; - public const int KILLFOCUS = 8; - public const int IME_STARTCOMPOSITION = 269; - public const int IME_ENDCOMPOSITION = 270; - public const int IME_COMPOSITION = 271; - public const int IME_SETCONTEXT = 641; - public const int IME_NOTIFY = 642; - public const int IME_CONTROL = 643; - public const int IME_COMPOSITIONFULL = 644; - public const int IME_SELECT = 645; - public const int IME_CHAR = 646; - public const int IME_KEYDOWN = 656; - public const int IME_KEYUP = 657; - public const int INPUTLANGCHANGE = 81; - public const int KEYDOWN = 256; - public const int CHAR = 258; - public const int ACTIVATE = 6; - } -} diff --git a/Src/ReLogic/OS/Windows/WindowsMessageHook.cs b/Src/ReLogic/OS/Windows/WindowsMessageHook.cs deleted file mode 100644 index 7ed6bb47..00000000 --- a/Src/ReLogic/OS/Windows/WindowsMessageHook.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.Windows.WindowsMessageHook -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ReLogic.OS.Windows -{ - internal class WindowsMessageHook : IDisposable, IMessageFilter - { - private const int GWL_WNDPROC = -4; - private IntPtr _windowHandle = IntPtr.Zero; - private IntPtr _previousWndProc = IntPtr.Zero; - private WindowsMessageHook.WndProcCallback _wndProc; - private List _filters = new List(); - private bool disposedValue; - - public WindowsMessageHook(IntPtr windowHandle) - { - this._windowHandle = windowHandle; - Application.AddMessageFilter((IMessageFilter) this); - this._wndProc = new WindowsMessageHook.WndProcCallback(this.WndProc); - this._previousWndProc = (IntPtr) WindowsApi.SetWindowLong(this._windowHandle, -4, (int) Marshal.GetFunctionPointerForDelegate((Delegate) this._wndProc)); - } - - public void AddMessageFilter(IMessageFilter filter) => this._filters.Add(filter); - - public void RemoveMessageFilter(IMessageFilter filter) => this._filters.Remove(filter); - - private IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam) - { - Message message = Message.Create(hWnd, msg, wParam, lParam); - return this.InternalWndProc(ref message) ? message.Result : WindowsApi.CallWindowProc(this._previousWndProc, message.HWnd, message.Msg, message.WParam, message.LParam); - } - - public bool PreFilterMessage(ref Message message) => message.Msg != 258 && this.InternalWndProc(ref message); - - private bool InternalWndProc(ref Message message) - { - foreach (IMessageFilter filter in this._filters) - { - if (filter.PreFilterMessage(ref message)) - return true; - } - return false; - } - - protected virtual void Dispose(bool disposing) - { - if (this.disposedValue) - return; - int num = disposing ? 1 : 0; - Application.RemoveMessageFilter((IMessageFilter) this); - WindowsApi.SetWindowLong(this._windowHandle, -4, (int) this._previousWndProc); - this.disposedValue = true; - } - - ~WindowsMessageHook() => this.Dispose(false); - - public void Dispose() - { - this.Dispose(true); - GC.SuppressFinalize((object) this); - } - - private delegate IntPtr WndProcCallback(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); - } -} diff --git a/Src/ReLogic/OS/WindowsPlatform.cs b/Src/ReLogic/OS/WindowsPlatform.cs deleted file mode 100644 index a2e8d643..00000000 --- a/Src/ReLogic/OS/WindowsPlatform.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.OS.WindowsPlatform -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using Microsoft.Xna.Framework; -using ReLogic.Localization.IME; -using ReLogic.OS.Windows; -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Threading; - -namespace ReLogic.OS -{ - internal class WindowsPlatform : Platform - { - private WindowsMessageHook _wndProcHook; - - public WindowsPlatform() - : base(PlatformType.Windows) - { - } - - private ApartmentState GetApartmentStateSafely() - { - try - { - return Thread.CurrentThread.GetApartmentState(); - } - catch - { - return ApartmentState.MTA; - } - } - - protected override string GetClipboard() => this.InvokeInStaThread((Func) (() => System.Windows.Forms.Clipboard.GetText())); - - protected override void SetClipboard(string text) - { - if (text == null || !(text != "")) - return; - this.InvokeInStaThread((Action) (() => System.Windows.Forms.Clipboard.SetText(text))); - } - - private T InvokeInStaThread(Func callback) - { - if (this.GetApartmentStateSafely() == ApartmentState.STA) - return callback(); - T result = default (T); - Thread thread = new Thread((ThreadStart) (() => result = callback())); - thread.SetApartmentState(ApartmentState.STA); - thread.Start(); - thread.Join(); - return result; - } - - private void InvokeInStaThread(Action callback) - { - if (this.GetApartmentStateSafely() == ApartmentState.STA) - { - callback(); - } - else - { - Thread thread = new Thread((ThreadStart) (() => callback())); - thread.SetApartmentState(ApartmentState.STA); - thread.Start(); - thread.Join(); - } - } - - public override string GetStoragePath() => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "My Games"); - - public override void SetWindowUnicodeTitle(GameWindow window, string title) - { - WindowsPlatform.WndProcCallback d = new WindowsPlatform.WndProcCallback(ReLogic.OS.Windows.NativeMethods.DefWindowProc); - IntPtr dwNewLong = ReLogic.OS.Windows.NativeMethods.SetWindowLong(window.Handle, -4, (int) Marshal.GetFunctionPointerForDelegate((Delegate) d)); - base.SetWindowUnicodeTitle(window, title); - ReLogic.OS.Windows.NativeMethods.SetWindowLong(window.Handle, -4, (int) dwNewLong); - } - - protected override PlatformIme CreateIme(IntPtr windowHandle) - { - if (this._wndProcHook == null) - this._wndProcHook = new WindowsMessageHook(windowHandle); - return (PlatformIme) new WindowsIme(this._wndProcHook, windowHandle); - } - - private delegate IntPtr WndProcCallback(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); - } -} diff --git a/Src/ReLogic/ReLogic.csproj b/Src/ReLogic/ReLogic.csproj deleted file mode 100644 index 37c20b7e..00000000 --- a/Src/ReLogic/ReLogic.csproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Debug - AnyCPU - {60C90A43-AE06-4EFC-9F63-B69B3320C05B} - Library - ReLogic - v4.0 - - 1.0.0.0 - 512 - ReLogic - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Src/ReLogic/ReLogic.sln b/Src/ReLogic/ReLogic.sln deleted file mode 100644 index 32831322..00000000 --- a/Src/ReLogic/ReLogic.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReLogic", "ReLogic.csproj", "{60C90A43-AE06-4EFC-9F63-B69B3320C05B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {60C90A43-AE06-4EFC-9F63-B69B3320C05B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60C90A43-AE06-4EFC-9F63-B69B3320C05B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {60C90A43-AE06-4EFC-9F63-B69B3320C05B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {60C90A43-AE06-4EFC-9F63-B69B3320C05B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Src/ReLogic/Reflection/IdDictionary.cs b/Src/ReLogic/Reflection/IdDictionary.cs deleted file mode 100644 index c441f6f1..00000000 --- a/Src/ReLogic/Reflection/IdDictionary.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Reflection.IdDictionary -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace ReLogic.Reflection -{ - public class IdDictionary - { - private Dictionary _nameToId = new Dictionary(); - private Dictionary _idToName; - public readonly int Count; - - private IdDictionary(int count) => this.Count = count; - - public bool TryGetName(int id, out string name) => this._idToName.TryGetValue(id, out name); - - public bool TryGetId(string name, out int id) => this._nameToId.TryGetValue(name, out id); - - public bool ContainsName(string name) => this._nameToId.ContainsKey(name); - - public bool ContainsId(int id) => this._idToName.ContainsKey(id); - - public string GetName(int id) => this._idToName[id]; - - public int GetId(string name) => this._nameToId[name]; - - public void Add(string name, int id) - { - this._idToName.Add(id, name); - this._nameToId.Add(name, id); - } - - public void Remove(string name) - { - this._idToName.Remove(this._nameToId[name]); - this._nameToId.Remove(name); - } - - public void Remove(int id) - { - this._nameToId.Remove(this._idToName[id]); - this._idToName.Remove(id); - } - - public static IdDictionary Create(Type idClass, Type idType) - { - int count = int.MaxValue; - FieldInfo fieldInfo = ((IEnumerable) idClass.GetFields()).FirstOrDefault((Func) (field => field.Name == "Count")); - if (fieldInfo != (FieldInfo) null) - count = Convert.ToInt32(fieldInfo.GetValue((object) null)); - IdDictionary dictionary = new IdDictionary(count); - ((IEnumerable) idClass.GetFields(BindingFlags.Static | BindingFlags.Public)).Where((Func) (f => f.FieldType == idType)).ToList().ForEach((Action) (field => - { - int int32 = Convert.ToInt32(field.GetValue((object) null)); - if (int32 >= dictionary.Count) - return; - dictionary._nameToId.Add(field.Name, int32); - })); - dictionary._idToName = dictionary._nameToId.ToDictionary, int, string>((Func, int>) (kp => kp.Value), (Func, string>) (kp => kp.Key)); - return dictionary; - } - - public static IdDictionary Create() => IdDictionary.Create(typeof (IdClass), typeof (IdType)); - } -} diff --git a/Src/ReLogic/Text/GlyphMetrics.cs b/Src/ReLogic/Text/GlyphMetrics.cs deleted file mode 100644 index 060d968e..00000000 --- a/Src/ReLogic/Text/GlyphMetrics.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Text.GlyphMetrics -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; - -namespace ReLogic.Text -{ - public struct GlyphMetrics - { - public readonly float LeftPadding; - public readonly float CharacterWidth; - public readonly float RightPadding; - - public float KernedWidth => this.LeftPadding + this.CharacterWidth + this.RightPadding; - - public float KernedWidthOnNewLine => Math.Max(0.0f, this.LeftPadding) + this.CharacterWidth + this.RightPadding; - - private GlyphMetrics(float leftPadding, float characterWidth, float rightPadding) - { - this.LeftPadding = leftPadding; - this.CharacterWidth = characterWidth; - this.RightPadding = rightPadding; - } - - public static GlyphMetrics FromKerningData( - float leftPadding, - float characterWidth, - float rightPadding) - { - return new GlyphMetrics(leftPadding, characterWidth, rightPadding); - } - } -} diff --git a/Src/ReLogic/Text/IFontMetrics.cs b/Src/ReLogic/Text/IFontMetrics.cs deleted file mode 100644 index 12a4e88d..00000000 --- a/Src/ReLogic/Text/IFontMetrics.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Text.IFontMetrics -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.Text -{ - public interface IFontMetrics - { - int LineSpacing { get; } - - float CharacterSpacing { get; } - - GlyphMetrics GetCharacterMetrics(char character); - } -} diff --git a/Src/ReLogic/Text/StringBuilderExtension.cs b/Src/ReLogic/Text/StringBuilderExtension.cs deleted file mode 100644 index 27da22df..00000000 --- a/Src/ReLogic/Text/StringBuilderExtension.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Text.StringBuilderExtension -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System.Text; - -namespace ReLogic.Text -{ - internal static class StringBuilderExtension - { - internal static bool IsEmpty(this StringBuilder stringBuilder) => stringBuilder.Length == 0; - } -} diff --git a/Src/ReLogic/Text/StringReaderWrapExtension.cs b/Src/ReLogic/Text/StringReaderWrapExtension.cs deleted file mode 100644 index 8fb4f1be..00000000 --- a/Src/ReLogic/Text/StringReaderWrapExtension.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Text.StringReaderWrapExtension -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; - -namespace ReLogic.Text -{ - internal static class StringReaderWrapExtension - { - private static readonly HashSet InvalidCharactersForLineStart = new HashSet() - { - '!', - '%', - ')', - ',', - '.', - ':', - ';', - '?', - ']', - '}', - '¢', - '°', - '·', - '’', - '"', - '"', - '†', - '‡', - '›', - '℃', - '∶', - '、', - '。', - '〃', - '〆', - '〕', - '〗', - '〞', - '﹚', - '﹜', - '!', - '"', - '%', - ''', - ')', - ',', - '.', - ':', - ';', - '?', - '!', - ']', - '}', - '~', - ' ', - '\n' - }; - private static readonly HashSet InvalidCharactersForLineEnd = new HashSet() - { - '$', - '(', - '£', - '¥', - '·', - '‘', - '"', - '〈', - '《', - '「', - '『', - '【', - '〔', - '〖', - '〝', - '﹙', - '﹛', - '$', - '(', - '.', - '[', - '{', - '£', - '¥' - }; - private static readonly CultureInfo[] SUPPORTED_CULTURES = new CultureInfo[9] - { - new CultureInfo("en-US"), - new CultureInfo("de-DE"), - new CultureInfo("it-IT"), - new CultureInfo("fr-FR"), - new CultureInfo("es-ES"), - new CultureInfo("ru-RU"), - new CultureInfo("zh-Hans"), - new CultureInfo("pt-BR"), - new CultureInfo("pl-PL") - }; - private static readonly CultureInfo SimplifiedChinese = new CultureInfo("zh-Hans"); - - internal static bool IsCultureSupported(CultureInfo culture) => ((IEnumerable) StringReaderWrapExtension.SUPPORTED_CULTURES).Contains(culture); - - internal static bool IsIgnoredCharacter(char character) => character < ' ' && character != '\n'; - - internal static bool CanBreakBetween(char previousChar, char nextChar, CultureInfo culture) => culture.LCID == StringReaderWrapExtension.SimplifiedChinese.LCID && !StringReaderWrapExtension.InvalidCharactersForLineEnd.Contains(previousChar) && !StringReaderWrapExtension.InvalidCharactersForLineStart.Contains(nextChar); - - internal static StringReaderWrapExtension.WrapScanMode GetModeForCharacter(char character) - { - if (StringReaderWrapExtension.IsIgnoredCharacter(character)) - return StringReaderWrapExtension.WrapScanMode.None; - if (character == '\n') - return StringReaderWrapExtension.WrapScanMode.NewLine; - return character == ' ' ? StringReaderWrapExtension.WrapScanMode.Space : StringReaderWrapExtension.WrapScanMode.Word; - } - - internal static string ReadUntilBreakable(this StringReader reader, CultureInfo culture) - { - StringBuilder stringBuilder = new StringBuilder(); - char ch = (char) reader.Peek(); - StringReaderWrapExtension.WrapScanMode wrapScanMode1 = StringReaderWrapExtension.WrapScanMode.None; - while (reader.Peek() > 0) - { - if (!StringReaderWrapExtension.IsIgnoredCharacter((char) reader.Peek())) - { - char previousChar = ch; - ch = (char) reader.Peek(); - StringReaderWrapExtension.WrapScanMode wrapScanMode2 = wrapScanMode1; - wrapScanMode1 = StringReaderWrapExtension.GetModeForCharacter(ch); - if (!stringBuilder.IsEmpty() && wrapScanMode2 != wrapScanMode1) - return stringBuilder.ToString(); - if (stringBuilder.IsEmpty()) - { - stringBuilder.Append((char) reader.Read()); - } - else - { - if (StringReaderWrapExtension.CanBreakBetween(previousChar, ch, culture)) - return stringBuilder.ToString(); - stringBuilder.Append((char) reader.Read()); - } - } - } - return stringBuilder.ToString(); - } - - internal enum WrapScanMode - { - Space, - NewLine, - Word, - None, - } - } -} diff --git a/Src/ReLogic/Text/TextUtilities.cs b/Src/ReLogic/Text/TextUtilities.cs deleted file mode 100644 index 8d5dd2aa..00000000 --- a/Src/ReLogic/Text/TextUtilities.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Text.TextUtilities -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.Text -{ - public static class TextUtilities - { - } -} diff --git a/Src/ReLogic/Text/WrappedTextBuilder.cs b/Src/ReLogic/Text/WrappedTextBuilder.cs deleted file mode 100644 index 892fff7e..00000000 --- a/Src/ReLogic/Text/WrappedTextBuilder.cs +++ /dev/null @@ -1,139 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Text.WrappedTextBuilder -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System.Globalization; -using System.IO; -using System.Text; - -namespace ReLogic.Text -{ - public class WrappedTextBuilder - { - private IFontMetrics _font; - private CultureInfo _culture; - private float _maxWidth; - private StringBuilder _completedText = new StringBuilder(); - private StringBuilder _workingLine = new StringBuilder(); - private float _workingLineWidth; - - public WrappedTextBuilder(IFontMetrics font, float maxWidth, CultureInfo culture) - { - this._font = font; - this._maxWidth = maxWidth; - this._culture = culture; - this._workingLineWidth = 0.0f; - } - - public void CommitWorkingLine() - { - if (!this._completedText.IsEmpty()) - this._completedText.Append('\n'); - this._workingLineWidth = 0.0f; - this._completedText.Append(this._workingLine.ToString()); - this._workingLine.Clear(); - } - - private void Append(WrappedTextBuilder.NonBreakingText textToken) - { - float num = !this._workingLine.IsEmpty() ? this._workingLineWidth + this._font.CharacterSpacing + textToken.Width : textToken.WidthOnNewLine; - if ((double) textToken.WidthOnNewLine > (double) this._maxWidth) - { - if (!this._workingLine.IsEmpty()) - this.CommitWorkingLine(); - this.Append(textToken.GetAsWrappedText(this._maxWidth)); - } - else if ((double) num <= (double) this._maxWidth) - { - this._workingLineWidth = num; - this._workingLine.Append(textToken.Text); - } - else if (this._workingLine.IsEmpty()) - { - this._completedText.Append(textToken.Text); - this._workingLine.Clear(); - this._workingLineWidth = 0.0f; - } - else - { - this.CommitWorkingLine(); - if (textToken.IsWhitespace) - return; - this._workingLine.Append(textToken.Text); - this._workingLineWidth = textToken.WidthOnNewLine; - } - } - - public void Append(string text) - { - StringReader reader = new StringReader(text); - this._completedText.EnsureCapacity(this._completedText.Capacity + text.Length); - while (reader.Peek() > 0) - { - if ((ushort) reader.Peek() == (ushort) 10) - { - reader.Read(); - this.CommitWorkingLine(); - } - else - this.Append(new WrappedTextBuilder.NonBreakingText(this._font, reader.ReadUntilBreakable(this._culture))); - } - } - - public override string ToString() => this._completedText.IsEmpty() ? this._workingLine.ToString() : this._completedText.ToString() + "\n" + this._workingLine.ToString(); - - private struct NonBreakingText - { - public readonly string Text; - public readonly float Width; - public readonly float WidthOnNewLine; - public readonly bool IsWhitespace; - private IFontMetrics _font; - - public NonBreakingText(IFontMetrics font, string text) - { - this.Text = text; - this.IsWhitespace = true; - float num1 = 0.0f; - float num2 = 0.0f; - this._font = font; - for (int index = 0; index < text.Length; ++index) - { - GlyphMetrics characterMetrics = font.GetCharacterMetrics(text[index]); - if (index == 0) - num2 = characterMetrics.KernedWidthOnNewLine - characterMetrics.KernedWidth; - else - num1 += font.CharacterSpacing; - num1 += characterMetrics.KernedWidth; - if (text[index] != ' ') - this.IsWhitespace = false; - } - this.Width = num1; - this.WidthOnNewLine = num1 + num2; - } - - public string GetAsWrappedText(float maxWidth) - { - float num = 0.0f; - StringBuilder stringBuilder = new StringBuilder(this.Text.Length); - for (int index = 0; index < this.Text.Length; ++index) - { - GlyphMetrics characterMetrics = this._font.GetCharacterMetrics(this.Text[index]); - if (index == 0) - num += characterMetrics.KernedWidthOnNewLine; - else - num += this._font.CharacterSpacing + characterMetrics.KernedWidth; - if ((double) num > (double) maxWidth) - { - num = characterMetrics.KernedWidthOnNewLine; - stringBuilder.Append('\n'); - } - stringBuilder.Append(this.Text[index]); - } - return stringBuilder.ToString(); - } - } - } -} diff --git a/Src/ReLogic/Utilities/AttributeUtilities.cs b/Src/ReLogic/Utilities/AttributeUtilities.cs deleted file mode 100644 index 20960b51..00000000 --- a/Src/ReLogic/Utilities/AttributeUtilities.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Utilities.AttributeUtilities -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Linq; - -namespace ReLogic.Utilities -{ - public static class AttributeUtilities - { - public static T GetAttribute(this Enum value) where T : Attribute - { - Type type = value.GetType(); - return type.GetField(Enum.GetName(type, (object) value)).GetCustomAttributes(false).OfType().SingleOrDefault(); - } - - public static A GetCacheableAttribute() where A : Attribute => AttributeUtilities.TypeAttributeCache.Value; - - public static T GetAttribute(this Type type) where T : Attribute => type.GetCustomAttributes(false).OfType().SingleOrDefault(); - - private static class TypeAttributeCache where A : Attribute - { - public static readonly A Value = typeof (T).GetAttribute(); - } - } -} diff --git a/Src/ReLogic/Utilities/MultiTimer.cs b/Src/ReLogic/Utilities/MultiTimer.cs deleted file mode 100644 index 6993c16d..00000000 --- a/Src/ReLogic/Utilities/MultiTimer.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Utilities.MultiTimer -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace ReLogic.Utilities -{ - public class MultiTimer - { - private int _ticksBetweenPrint; - private int _ticksElapsedForPrint; - private Stopwatch _timer = new Stopwatch(); - private Dictionary _timerDataMap = new Dictionary(); - - public MultiTimer(int ticksBetweenPrint = 100) => this._ticksBetweenPrint = ticksBetweenPrint; - - public void Start() - { - this._timer.Reset(); - this._timer.Start(); - } - - public void Record(string key) - { - double totalMilliseconds = this._timer.Elapsed.TotalMilliseconds; - MultiTimer.TimerData timerData; - if (!this._timerDataMap.TryGetValue(key, out timerData)) - this._timerDataMap.Add(key, new MultiTimer.TimerData(totalMilliseconds)); - else - this._timerDataMap[key] = timerData.AddTick(totalMilliseconds); - this._timer.Restart(); - } - - public bool StopAndPrint() - { - ++this._ticksElapsedForPrint; - if (this._ticksElapsedForPrint != this._ticksBetweenPrint) - return false; - this._ticksElapsedForPrint = 0; - Console.WriteLine("Average elapsed time: "); - double num1 = 0.0; - int val2 = 0; - foreach (KeyValuePair timerData in this._timerDataMap) - val2 = Math.Max(timerData.Key.Length, val2); - foreach (KeyValuePair timerData1 in this._timerDataMap) - { - MultiTimer.TimerData timerData2 = timerData1.Value; - string str = new string(' ', val2 - timerData1.Key.Length); - object[] objArray = new object[11]; - objArray[0] = (object) timerData1.Key; - objArray[1] = (object) str; - objArray[2] = (object) " : (Average: "; - double num2 = timerData2.Average; - objArray[3] = (object) num2.ToString("F4"); - objArray[4] = (object) " Min: "; - num2 = timerData2.Min; - objArray[5] = (object) num2.ToString("F4"); - objArray[6] = (object) " Max: "; - num2 = timerData2.Max; - objArray[7] = (object) num2.ToString("F4"); - objArray[8] = (object) " from "; - objArray[9] = (object) (int) timerData2.Ticks; - objArray[10] = (object) " records)"; - Console.WriteLine(string.Concat(objArray)); - num1 += timerData2.Total; - } - this._timerDataMap.Clear(); - Console.WriteLine("Total : " + (object) (float) (num1 / (double) this._ticksBetweenPrint) + "ms"); - return true; - } - - private struct TimerData - { - public readonly double Min; - public readonly double Max; - public readonly double Ticks; - public readonly double Total; - - public double Average => this.Total / this.Ticks; - - private TimerData(double min, double max, double ticks, double total) - { - this.Min = min; - this.Max = max; - this.Ticks = ticks; - this.Total = total; - } - - public TimerData(double startTime) - { - this.Min = startTime; - this.Max = startTime; - this.Ticks = 1.0; - this.Total = startTime; - } - - public MultiTimer.TimerData AddTick(double time) => new MultiTimer.TimerData(Math.Min(this.Min, time), Math.Max(this.Max, time), this.Ticks + 1.0, this.Total + time); - } - } -} diff --git a/Src/ReLogic/Utilities/ReinterpretCast.cs b/Src/ReLogic/Utilities/ReinterpretCast.cs deleted file mode 100644 index 92d4274c..00000000 --- a/Src/ReLogic/Utilities/ReinterpretCast.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Utilities.ReinterpretCast -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System.Runtime.InteropServices; - -namespace ReLogic.Utilities -{ - public static class ReinterpretCast - { - public static float UIntAsFloat(uint value) => new ReinterpretCast.UIntFloat(value).FloatValue; - - public static float IntAsFloat(int value) => new ReinterpretCast.IntFloat(value).FloatValue; - - public static uint FloatAsUInt(float value) => new ReinterpretCast.UIntFloat(value).UIntValue; - - public static int FloatAsInt(float value) => new ReinterpretCast.IntFloat(value).IntValue; - - [StructLayout(LayoutKind.Explicit)] - private struct IntFloat - { - [FieldOffset(0)] - public readonly int IntValue; - [FieldOffset(0)] - public readonly float FloatValue; - - public IntFloat(int value) - { - this.FloatValue = 0.0f; - this.IntValue = value; - } - - public IntFloat(float value) - { - this.IntValue = 0; - this.FloatValue = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - private struct UIntFloat - { - [FieldOffset(0)] - public readonly uint UIntValue; - [FieldOffset(0)] - public readonly float FloatValue; - - public UIntFloat(uint value) - { - this.FloatValue = 0.0f; - this.UIntValue = value; - } - - public UIntFloat(float value) - { - this.UIntValue = 0U; - this.FloatValue = value; - } - } - } -} diff --git a/Src/ReLogic/Utilities/SlotId.cs b/Src/ReLogic/Utilities/SlotId.cs deleted file mode 100644 index 4c03b4a8..00000000 --- a/Src/ReLogic/Utilities/SlotId.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Utilities.SlotId -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -namespace ReLogic.Utilities -{ - public struct SlotId - { - public static readonly SlotId Invalid = new SlotId((uint) ushort.MaxValue); - private const uint KEY_INC = 65536; - private const uint INDEX_MASK = 65535; - private const uint ACTIVE_MASK = 2147483648; - private const uint KEY_MASK = 2147418112; - public readonly uint Value; - - public bool IsValid => ((int) this.Value & (int) ushort.MaxValue) != (int) ushort.MaxValue; - - internal bool IsActive => ((int) this.Value & int.MinValue) != 0 && this.IsValid; - - internal uint Index => this.Value & (uint) ushort.MaxValue; - - internal uint Key => this.Value & 2147418112U; - - internal SlotId ToInactive(uint freeHead) => new SlotId(this.Key | freeHead); - - internal SlotId ToActive(uint index) => new SlotId((uint) (int.MinValue | 2147418112 & (int) this.Key + 65536) | index); - - public SlotId(uint value) => this.Value = value; - - public override bool Equals(object obj) => obj is SlotId slotId && (int) slotId.Value == (int) this.Value; - - public override int GetHashCode() => this.Value.GetHashCode(); - - public static bool operator ==(SlotId lhs, SlotId rhs) => (int) lhs.Value == (int) rhs.Value; - - public static bool operator !=(SlotId lhs, SlotId rhs) => (int) lhs.Value != (int) rhs.Value; - - public float ToFloat() => ReinterpretCast.UIntAsFloat(this.Value); - - public static SlotId FromFloat(float value) => new SlotId(ReinterpretCast.FloatAsUInt(value)); - } -} diff --git a/Src/ReLogic/Utilities/SlotVector`1.cs b/Src/ReLogic/Utilities/SlotVector`1.cs deleted file mode 100644 index 887a8967..00000000 --- a/Src/ReLogic/Utilities/SlotVector`1.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: ReLogic.Utilities.SlotVector`1 -// Assembly: ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 33513C57-D94A-4BED-935B-7012D40A5531 -// Assembly location: C:\Users\Admin\Desktop\re\ReLogic.dll - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace ReLogic.Utilities -{ - public class SlotVector : IEnumerable.ItemPair>, IEnumerable - { - private const uint MAX_INDEX = 65535; - private SlotVector.ItemPair[] _array; - private uint _freeHead; - private uint _usedSpaceLength; - private int _count; - - public T this[int index] - { - get - { - if (index < 0 || index >= this._array.Length) - throw new IndexOutOfRangeException(); - if (!this._array[index].Id.IsActive) - throw new KeyNotFoundException(); - return this._array[index].Value; - } - set - { - if (index < 0 || index >= this._array.Length) - throw new IndexOutOfRangeException(); - if (!this._array[index].Id.IsActive) - throw new KeyNotFoundException(); - this._array[index] = new SlotVector.ItemPair(value, this._array[index].Id); - } - } - - public T this[SlotId id] - { - get - { - uint index = id.Index; - if (index < 0U || (long) index >= (long) this._array.Length) - throw new IndexOutOfRangeException(); - if (!this._array[(int) index].Id.IsActive || id != this._array[(int) index].Id) - throw new KeyNotFoundException(); - return this._array[(int) index].Value; - } - set - { - uint index = id.Index; - if (index < 0U || (long) index >= (long) this._array.Length) - throw new IndexOutOfRangeException(); - if (!this._array[(int) index].Id.IsActive || id != this._array[(int) index].Id) - throw new KeyNotFoundException(); - this._array[(int) index] = new SlotVector.ItemPair(value, id); - } - } - - public int Count => this._count; - - public int Capacity => this._array.Length; - - public SlotVector(int capacity) - { - this._array = new SlotVector.ItemPair[capacity]; - this.Clear(); - } - - public SlotId Add(T value) - { - if (this._freeHead == (uint) ushort.MaxValue) - return new SlotId((uint) ushort.MaxValue); - uint freeHead = this._freeHead; - SlotVector.ItemPair itemPair = this._array[(int) freeHead]; - if (this._freeHead >= this._usedSpaceLength) - this._usedSpaceLength = this._freeHead + 1U; - this._freeHead = itemPair.Id.Index; - this._array[(int) freeHead] = new SlotVector.ItemPair(value, itemPair.Id.ToActive(freeHead)); - ++this._count; - return this._array[(int) freeHead].Id; - } - - public void Clear() - { - this._usedSpaceLength = 0U; - this._count = 0; - this._freeHead = 0U; - for (uint index = 0; (long) index < (long) (this._array.Length - 1); ++index) - this._array[(int) index] = new SlotVector.ItemPair(default (T), new SlotId(index + 1U)); - this._array[this._array.Length - 1] = new SlotVector.ItemPair(default (T), new SlotId((uint) ushort.MaxValue)); - } - - public bool Remove(SlotId id) - { - if (!id.IsActive) - return false; - uint index = id.Index; - this._array[(int) index] = new SlotVector.ItemPair(default (T), id.ToInactive(this._freeHead)); - this._freeHead = index; - --this._count; - return true; - } - - public bool Has(SlotId id) - { - uint index = id.Index; - return index >= 0U && (long) index < (long) this._array.Length && this._array[(int) index].Id.IsActive && !(id != this._array[(int) index].Id); - } - - public bool Has(int index) => index >= 0 && index < this._array.Length && this._array[index].Id.IsActive; - - public SlotVector.ItemPair GetPair(int index) => this.Has(index) ? this._array[index] : new SlotVector.ItemPair(default (T), SlotId.Invalid); - - IEnumerator IEnumerable.GetEnumerator() => (IEnumerator) new SlotVector.Enumerator(this); - - IEnumerator.ItemPair> IEnumerable.ItemPair>.GetEnumerator() => (IEnumerator.ItemPair>) new SlotVector.Enumerator(this); - - public class Enumerator : IEnumerator.ItemPair>, IDisposable, IEnumerator - { - private SlotVector _slotVector; - private int _index = -1; - - public Enumerator(SlotVector slotVector) => this._slotVector = slotVector; - - SlotVector.ItemPair IEnumerator.ItemPair>.Current => this._slotVector.GetPair(this._index); - - object IEnumerator.Current => (object) this._slotVector.GetPair(this._index); - - public void Reset() => this._index = -1; - - public bool MoveNext() - { - while ((long) ++this._index < (long) this._slotVector._usedSpaceLength) - { - if (this._slotVector.Has(this._index)) - return true; - } - return false; - } - - void IDisposable.Dispose() => this._slotVector = (SlotVector) null; - } - - public struct ItemPair - { - public readonly T Value; - public readonly SlotId Id; - - public ItemPair(T value, SlotId id) - { - this.Value = value; - this.Id = id; - } - } - } -} diff --git a/Src/SteamworksNET/AccountID_t.cs b/Src/SteamworksNET/AccountID_t.cs deleted file mode 100644 index 436d1681..00000000 --- a/Src/SteamworksNET/AccountID_t.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.AccountID_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct AccountID_t : IEquatable, IComparable - { - public uint m_AccountID; - - public AccountID_t(uint value) => this.m_AccountID = value; - - public override string ToString() => this.m_AccountID.ToString(); - - public override bool Equals(object other) => other is AccountID_t accountIdT && this == accountIdT; - - public override int GetHashCode() => this.m_AccountID.GetHashCode(); - - public static bool operator ==(AccountID_t x, AccountID_t y) => (int) x.m_AccountID == (int) y.m_AccountID; - - public static bool operator !=(AccountID_t x, AccountID_t y) => !(x == y); - - public static explicit operator AccountID_t(uint value) => new AccountID_t(value); - - public static explicit operator uint(AccountID_t that) => that.m_AccountID; - - public bool Equals(AccountID_t other) => (int) this.m_AccountID == (int) other.m_AccountID; - - public int CompareTo(AccountID_t other) => this.m_AccountID.CompareTo(other.m_AccountID); - } -} diff --git a/Src/SteamworksNET/AppId_t.cs b/Src/SteamworksNET/AppId_t.cs deleted file mode 100644 index a8578de1..00000000 --- a/Src/SteamworksNET/AppId_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.AppId_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct AppId_t : IEquatable, IComparable - { - public static readonly AppId_t Invalid = new AppId_t(0U); - public uint m_AppId; - - public AppId_t(uint value) => this.m_AppId = value; - - public override string ToString() => this.m_AppId.ToString(); - - public override bool Equals(object other) => other is AppId_t appIdT && this == appIdT; - - public override int GetHashCode() => this.m_AppId.GetHashCode(); - - public static bool operator ==(AppId_t x, AppId_t y) => (int) x.m_AppId == (int) y.m_AppId; - - public static bool operator !=(AppId_t x, AppId_t y) => !(x == y); - - public static explicit operator AppId_t(uint value) => new AppId_t(value); - - public static explicit operator uint(AppId_t that) => that.m_AppId; - - public bool Equals(AppId_t other) => (int) this.m_AppId == (int) other.m_AppId; - - public int CompareTo(AppId_t other) => this.m_AppId.CompareTo(other.m_AppId); - } -} diff --git a/Src/SteamworksNET/AppProofOfPurchaseKeyResponse_t.cs b/Src/SteamworksNET/AppProofOfPurchaseKeyResponse_t.cs deleted file mode 100644 index 69f74747..00000000 --- a/Src/SteamworksNET/AppProofOfPurchaseKeyResponse_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.AppProofOfPurchaseKeyResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1021)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct AppProofOfPurchaseKeyResponse_t - { - public const int k_iCallback = 1021; - public EResult m_eResult; - public uint m_nAppID; - public uint m_cchKeyLength; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 240)] - public string m_rgchKey; - } -} diff --git a/Src/SteamworksNET/AssemblyInfo.cs b/Src/SteamworksNET/AssemblyInfo.cs deleted file mode 100644 index b7e1131b..00000000 --- a/Src/SteamworksNET/AssemblyInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Steamworks.NET")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Riley Labrecque")] -[assembly: AssemblyProduct("Steamworks.NET")] -[assembly: AssemblyCopyright("Copyright © Riley Labrecque 2013-2017")] -[assembly: AssemblyTrademark("")] -[assembly: ComVisible(false)] -[assembly: Guid("316ab144-2a2a-4847-857b-63317c980dda")] -[assembly: AssemblyFileVersion("9.1.0")] -[assembly: AssemblyVersion("9.1.0.0")] diff --git a/Src/SteamworksNET/AssociateWithClanResult_t.cs b/Src/SteamworksNET/AssociateWithClanResult_t.cs deleted file mode 100644 index 3893c0ee..00000000 --- a/Src/SteamworksNET/AssociateWithClanResult_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.AssociateWithClanResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(210)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct AssociateWithClanResult_t - { - public const int k_iCallback = 210; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/AudioPlayback_Status.cs b/Src/SteamworksNET/AudioPlayback_Status.cs deleted file mode 100644 index 3c6d5a8c..00000000 --- a/Src/SteamworksNET/AudioPlayback_Status.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.AudioPlayback_Status -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum AudioPlayback_Status - { - AudioPlayback_Undefined, - AudioPlayback_Playing, - AudioPlayback_Paused, - AudioPlayback_Idle, - } -} diff --git a/Src/SteamworksNET/AvatarImageLoaded_t.cs b/Src/SteamworksNET/AvatarImageLoaded_t.cs deleted file mode 100644 index 1e3e31b3..00000000 --- a/Src/SteamworksNET/AvatarImageLoaded_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.AvatarImageLoaded_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(334)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct AvatarImageLoaded_t - { - public const int k_iCallback = 334; - public CSteamID m_steamID; - public int m_iImage; - public int m_iWide; - public int m_iTall; - } -} diff --git a/Src/SteamworksNET/BroadcastUploadStart_t.cs b/Src/SteamworksNET/BroadcastUploadStart_t.cs deleted file mode 100644 index 24eca745..00000000 --- a/Src/SteamworksNET/BroadcastUploadStart_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.BroadcastUploadStart_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4604)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct BroadcastUploadStart_t - { - public const int k_iCallback = 4604; - } -} diff --git a/Src/SteamworksNET/BroadcastUploadStop_t.cs b/Src/SteamworksNET/BroadcastUploadStop_t.cs deleted file mode 100644 index 7371cb13..00000000 --- a/Src/SteamworksNET/BroadcastUploadStop_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.BroadcastUploadStop_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4605)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct BroadcastUploadStop_t - { - public const int k_iCallback = 4605; - public EBroadcastUploadResult m_eResult; - } -} diff --git a/Src/SteamworksNET/CCallbackBase.cs b/Src/SteamworksNET/CCallbackBase.cs deleted file mode 100644 index 1b12d362..00000000 --- a/Src/SteamworksNET/CCallbackBase.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CCallbackBase -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential)] - internal class CCallbackBase - { - public const byte k_ECallbackFlagsRegistered = 1; - public const byte k_ECallbackFlagsGameServer = 2; - public IntPtr m_vfptr; - public byte m_nCallbackFlags; - public int m_iCallback; - } -} diff --git a/Src/SteamworksNET/CCallbackBaseVTable.cs b/Src/SteamworksNET/CCallbackBaseVTable.cs deleted file mode 100644 index df8438f4..00000000 --- a/Src/SteamworksNET/CCallbackBaseVTable.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CCallbackBaseVTable -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential)] - internal class CCallbackBaseVTable - { - private const CallingConvention cc = CallingConvention.ThisCall; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public CCallbackBaseVTable.RunCRDel m_RunCallResult; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public CCallbackBaseVTable.RunCBDel m_RunCallback; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public CCallbackBaseVTable.GetCallbackSizeBytesDel m_GetCallbackSizeBytes; - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void RunCBDel(IntPtr thisptr, IntPtr pvParam); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void RunCRDel( - IntPtr thisptr, - IntPtr pvParam, - [MarshalAs(UnmanagedType.I1)] bool bIOFailure, - ulong hSteamAPICall); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate int GetCallbackSizeBytesDel(IntPtr thisptr); - } -} diff --git a/Src/SteamworksNET/CGameID.cs b/Src/SteamworksNET/CGameID.cs deleted file mode 100644 index 4c9327f9..00000000 --- a/Src/SteamworksNET/CGameID.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CGameID -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct CGameID : IEquatable, IComparable - { - public ulong m_GameID; - - public CGameID(ulong GameID) => this.m_GameID = GameID; - - public CGameID(AppId_t nAppID) - { - this.m_GameID = 0UL; - this.SetAppID(nAppID); - } - - public CGameID(AppId_t nAppID, uint nModID) - { - this.m_GameID = 0UL; - this.SetAppID(nAppID); - this.SetType(CGameID.EGameIDType.k_EGameIDTypeGameMod); - this.SetModID(nModID); - } - - public bool IsSteamApp() => this.Type() == CGameID.EGameIDType.k_EGameIDTypeApp; - - public bool IsMod() => this.Type() == CGameID.EGameIDType.k_EGameIDTypeGameMod; - - public bool IsShortcut() => this.Type() == CGameID.EGameIDType.k_EGameIDTypeShortcut; - - public bool IsP2PFile() => this.Type() == CGameID.EGameIDType.k_EGameIDTypeP2P; - - public AppId_t AppID() => new AppId_t((uint) (this.m_GameID & 16777215UL)); - - public CGameID.EGameIDType Type() => (CGameID.EGameIDType) ((long) (this.m_GameID >> 24) & (long) byte.MaxValue); - - public uint ModID() => (uint) (this.m_GameID >> 32 & (ulong) uint.MaxValue); - - public bool IsValid() - { - switch (this.Type()) - { - case CGameID.EGameIDType.k_EGameIDTypeApp: - return this.AppID() != AppId_t.Invalid; - case CGameID.EGameIDType.k_EGameIDTypeGameMod: - return this.AppID() != AppId_t.Invalid && (this.ModID() & 2147483648U) > 0U; - case CGameID.EGameIDType.k_EGameIDTypeShortcut: - return (this.ModID() & 2147483648U) > 0U; - case CGameID.EGameIDType.k_EGameIDTypeP2P: - return this.AppID() == AppId_t.Invalid && (this.ModID() & 2147483648U) > 0U; - default: - return false; - } - } - - public void Reset() => this.m_GameID = 0UL; - - public void Set(ulong GameID) => this.m_GameID = GameID; - - private void SetAppID(AppId_t other) => this.m_GameID = (ulong) ((long) this.m_GameID & -16777216L | (long) (uint) other & 16777215L); - - private void SetType(CGameID.EGameIDType other) => this.m_GameID = (ulong) ((long) this.m_GameID & -4278190081L | ((long) other & (long) byte.MaxValue) << 24); - - private void SetModID(uint other) => this.m_GameID = (ulong) ((long) this.m_GameID & (long) uint.MaxValue | ((long) other & (long) uint.MaxValue) << 32); - - public override string ToString() => this.m_GameID.ToString(); - - public override bool Equals(object other) => other is CGameID cgameId && this == cgameId; - - public override int GetHashCode() => this.m_GameID.GetHashCode(); - - public static bool operator ==(CGameID x, CGameID y) => (long) x.m_GameID == (long) y.m_GameID; - - public static bool operator !=(CGameID x, CGameID y) => !(x == y); - - public static explicit operator CGameID(ulong value) => new CGameID(value); - - public static explicit operator ulong(CGameID that) => that.m_GameID; - - public bool Equals(CGameID other) => (long) this.m_GameID == (long) other.m_GameID; - - public int CompareTo(CGameID other) => this.m_GameID.CompareTo(other.m_GameID); - - public enum EGameIDType - { - k_EGameIDTypeApp, - k_EGameIDTypeGameMod, - k_EGameIDTypeShortcut, - k_EGameIDTypeP2P, - } - } -} diff --git a/Src/SteamworksNET/CSteamID.cs b/Src/SteamworksNET/CSteamID.cs deleted file mode 100644 index e3aecc53..00000000 --- a/Src/SteamworksNET/CSteamID.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CSteamID -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [Serializable] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct CSteamID : IEquatable, IComparable - { - public static readonly CSteamID Nil = new CSteamID(); - public static readonly CSteamID OutofDateGS = new CSteamID(new AccountID_t(0U), 0U, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); - public static readonly CSteamID LanModeGS = new CSteamID(new AccountID_t(0U), 0U, EUniverse.k_EUniversePublic, EAccountType.k_EAccountTypeInvalid); - public static readonly CSteamID NotInitYetGS = new CSteamID(new AccountID_t(1U), 0U, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); - public static readonly CSteamID NonSteamGS = new CSteamID(new AccountID_t(2U), 0U, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); - public ulong m_SteamID; - - public CSteamID(AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType) - { - this.m_SteamID = 0UL; - this.Set(unAccountID, eUniverse, eAccountType); - } - - public CSteamID( - AccountID_t unAccountID, - uint unAccountInstance, - EUniverse eUniverse, - EAccountType eAccountType) - { - this.m_SteamID = 0UL; - this.InstancedSet(unAccountID, unAccountInstance, eUniverse, eAccountType); - } - - public CSteamID(ulong ulSteamID) => this.m_SteamID = ulSteamID; - - public void Set(AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType) - { - this.SetAccountID(unAccountID); - this.SetEUniverse(eUniverse); - this.SetEAccountType(eAccountType); - if (eAccountType == EAccountType.k_EAccountTypeClan || eAccountType == EAccountType.k_EAccountTypeGameServer) - this.SetAccountInstance(0U); - else - this.SetAccountInstance(1U); - } - - public void InstancedSet( - AccountID_t unAccountID, - uint unInstance, - EUniverse eUniverse, - EAccountType eAccountType) - { - this.SetAccountID(unAccountID); - this.SetEUniverse(eUniverse); - this.SetEAccountType(eAccountType); - this.SetAccountInstance(unInstance); - } - - public void Clear() => this.m_SteamID = 0UL; - - public void CreateBlankAnonLogon(EUniverse eUniverse) - { - this.SetAccountID(new AccountID_t(0U)); - this.SetEUniverse(eUniverse); - this.SetEAccountType(EAccountType.k_EAccountTypeAnonGameServer); - this.SetAccountInstance(0U); - } - - public void CreateBlankAnonUserLogon(EUniverse eUniverse) - { - this.SetAccountID(new AccountID_t(0U)); - this.SetEUniverse(eUniverse); - this.SetEAccountType(EAccountType.k_EAccountTypeAnonUser); - this.SetAccountInstance(0U); - } - - public bool BBlankAnonAccount() => this.GetAccountID() == new AccountID_t(0U) && this.BAnonAccount() && this.GetUnAccountInstance() == 0U; - - public bool BGameServerAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeGameServer || this.GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; - - public bool BPersistentGameServerAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeGameServer; - - public bool BAnonGameServerAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; - - public bool BContentServerAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeContentServer; - - public bool BClanAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeClan; - - public bool BChatAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeChat; - - public bool IsLobby() => this.GetEAccountType() == EAccountType.k_EAccountTypeChat && (this.GetUnAccountInstance() & 262144U) > 0U; - - public bool BIndividualAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeIndividual || this.GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; - - public bool BAnonAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeAnonUser || this.GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; - - public bool BAnonUserAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeAnonUser; - - public bool BConsoleUserAccount() => this.GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; - - public void SetAccountID(AccountID_t other) => this.m_SteamID = (ulong) ((long) this.m_SteamID & -4294967296L | (long) (uint) other & (long) uint.MaxValue); - - public void SetAccountInstance(uint other) => this.m_SteamID = (ulong) ((long) this.m_SteamID & -4503595332403201L | ((long) other & 1048575L) << 32); - - public void SetEAccountType(EAccountType other) => this.m_SteamID = (ulong) ((long) this.m_SteamID & -67553994410557441L | ((long) other & 15L) << 52); - - public void SetEUniverse(EUniverse other) => this.m_SteamID = (ulong) ((long) this.m_SteamID & 72057594037927935L | ((long) other & (long) byte.MaxValue) << 56); - - public void ClearIndividualInstance() - { - if (!this.BIndividualAccount()) - return; - this.SetAccountInstance(0U); - } - - public bool HasNoIndividualInstance() => this.BIndividualAccount() && this.GetUnAccountInstance() == 0U; - - public AccountID_t GetAccountID() => new AccountID_t((uint) (this.m_SteamID & (ulong) uint.MaxValue)); - - public uint GetUnAccountInstance() => (uint) (this.m_SteamID >> 32 & 1048575UL); - - public EAccountType GetEAccountType() => (EAccountType) ((long) (this.m_SteamID >> 52) & 15L); - - public EUniverse GetEUniverse() => (EUniverse) ((long) (this.m_SteamID >> 56) & (long) byte.MaxValue); - - public bool IsValid() => this.GetEAccountType() > EAccountType.k_EAccountTypeInvalid && this.GetEAccountType() < EAccountType.k_EAccountTypeMax && this.GetEUniverse() > EUniverse.k_EUniverseInvalid && this.GetEUniverse() < EUniverse.k_EUniverseMax && (this.GetEAccountType() != EAccountType.k_EAccountTypeIndividual || !(this.GetAccountID() == new AccountID_t(0U)) && this.GetUnAccountInstance() <= 4U) && (this.GetEAccountType() != EAccountType.k_EAccountTypeClan || !(this.GetAccountID() == new AccountID_t(0U)) && this.GetUnAccountInstance() == 0U) && (this.GetEAccountType() != EAccountType.k_EAccountTypeGameServer || !(this.GetAccountID() == new AccountID_t(0U))); - - public override string ToString() => this.m_SteamID.ToString(); - - public override bool Equals(object other) => other is CSteamID csteamId && this == csteamId; - - public override int GetHashCode() => this.m_SteamID.GetHashCode(); - - public static bool operator ==(CSteamID x, CSteamID y) => (long) x.m_SteamID == (long) y.m_SteamID; - - public static bool operator !=(CSteamID x, CSteamID y) => !(x == y); - - public static explicit operator CSteamID(ulong value) => new CSteamID(value); - - public static explicit operator ulong(CSteamID that) => that.m_SteamID; - - public bool Equals(CSteamID other) => (long) this.m_SteamID == (long) other.m_SteamID; - - public int CompareTo(CSteamID other) => this.m_SteamID.CompareTo(other.m_SteamID); - } -} diff --git a/Src/SteamworksNET/CallResult`1.cs b/Src/SteamworksNET/CallResult`1.cs deleted file mode 100644 index bbf15450..00000000 --- a/Src/SteamworksNET/CallResult`1.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CallResult`1 -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public sealed class CallResult : IDisposable - { - private CCallbackBaseVTable VTable; - private IntPtr m_pVTable = IntPtr.Zero; - private CCallbackBase m_CCallbackBase; - private GCHandle m_pCCallbackBase; - private SteamAPICall_t m_hAPICall = SteamAPICall_t.Invalid; - private readonly int m_size = Marshal.SizeOf(typeof (T)); - private bool m_bDisposed; - - private event CallResult.APIDispatchDelegate m_Func; - - public SteamAPICall_t Handle => this.m_hAPICall; - - public static CallResult Create(CallResult.APIDispatchDelegate func = null) => new CallResult(func); - - public CallResult(CallResult.APIDispatchDelegate func = null) - { - this.m_Func = func; - this.BuildCCallbackBase(); - } - - ~CallResult() => this.Dispose(); - - public void Dispose() - { - if (this.m_bDisposed) - return; - GC.SuppressFinalize((object) this); - this.Cancel(); - if (this.m_pVTable != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pVTable); - if (this.m_pCCallbackBase.IsAllocated) - this.m_pCCallbackBase.Free(); - this.m_bDisposed = true; - } - - public void Set(SteamAPICall_t hAPICall, CallResult.APIDispatchDelegate func = null) - { - if (func != null) - this.m_Func = func; - if (this.m_Func == null) - throw new Exception("CallResult function was null, you must either set it in the CallResult Constructor or in Set()"); - if (this.m_hAPICall != SteamAPICall_t.Invalid) - NativeMethods.SteamAPI_UnregisterCallResult(this.m_pCCallbackBase.AddrOfPinnedObject(), (ulong) this.m_hAPICall); - this.m_hAPICall = hAPICall; - if (!(hAPICall != SteamAPICall_t.Invalid)) - return; - NativeMethods.SteamAPI_RegisterCallResult(this.m_pCCallbackBase.AddrOfPinnedObject(), (ulong) hAPICall); - } - - public bool IsActive() => this.m_hAPICall != SteamAPICall_t.Invalid; - - public void Cancel() - { - if (!(this.m_hAPICall != SteamAPICall_t.Invalid)) - return; - NativeMethods.SteamAPI_UnregisterCallResult(this.m_pCCallbackBase.AddrOfPinnedObject(), (ulong) this.m_hAPICall); - this.m_hAPICall = SteamAPICall_t.Invalid; - } - - public void SetGameserverFlag() => this.m_CCallbackBase.m_nCallbackFlags |= (byte) 2; - - private void OnRunCallback(IntPtr thisptr, IntPtr pvParam) - { - this.m_hAPICall = SteamAPICall_t.Invalid; - try - { - this.m_Func((T) Marshal.PtrToStructure(pvParam, typeof (T)), false); - } - catch (Exception ex) - { - CallbackDispatcher.ExceptionHandler(ex); - } - } - - private void OnRunCallResult( - IntPtr thisptr, - IntPtr pvParam, - bool bFailed, - ulong hSteamAPICall_) - { - if (!((SteamAPICall_t) hSteamAPICall_ == this.m_hAPICall)) - return; - this.m_hAPICall = SteamAPICall_t.Invalid; - try - { - this.m_Func((T) Marshal.PtrToStructure(pvParam, typeof (T)), bFailed); - } - catch (Exception ex) - { - CallbackDispatcher.ExceptionHandler(ex); - } - } - - private int OnGetCallbackSizeBytes(IntPtr thisptr) => this.m_size; - - private void BuildCCallbackBase() - { - this.VTable = new CCallbackBaseVTable() - { - m_RunCallback = new CCallbackBaseVTable.RunCBDel(this.OnRunCallback), - m_RunCallResult = new CCallbackBaseVTable.RunCRDel(this.OnRunCallResult), - m_GetCallbackSizeBytes = new CCallbackBaseVTable.GetCallbackSizeBytesDel(this.OnGetCallbackSizeBytes) - }; - this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (CCallbackBaseVTable))); - Marshal.StructureToPtr((object) this.VTable, this.m_pVTable, false); - this.m_CCallbackBase = new CCallbackBase() - { - m_vfptr = this.m_pVTable, - m_nCallbackFlags = (byte) 0, - m_iCallback = CallbackIdentities.GetCallbackIdentity(typeof (T)) - }; - this.m_pCCallbackBase = GCHandle.Alloc((object) this.m_CCallbackBase, GCHandleType.Pinned); - } - - public delegate void APIDispatchDelegate(T param, bool bIOFailure); - } -} diff --git a/Src/SteamworksNET/CallbackDispatcher.cs b/Src/SteamworksNET/CallbackDispatcher.cs deleted file mode 100644 index 3355d4d3..00000000 --- a/Src/SteamworksNET/CallbackDispatcher.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CallbackDispatcher -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - public static class CallbackDispatcher - { - public static void ExceptionHandler(Exception e) => Console.WriteLine(e.Message); - } -} diff --git a/Src/SteamworksNET/CallbackIdentities.cs b/Src/SteamworksNET/CallbackIdentities.cs deleted file mode 100644 index 83f02bd6..00000000 --- a/Src/SteamworksNET/CallbackIdentities.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CallbackIdentities -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - internal class CallbackIdentities - { - public static int GetCallbackIdentity(Type callbackStruct) - { - object[] customAttributes = callbackStruct.GetCustomAttributes(typeof (CallbackIdentityAttribute), false); - int index = 0; - if (index < customAttributes.Length) - return ((CallbackIdentityAttribute) customAttributes[index]).Identity; - throw new Exception("Callback number not found for struct " + (object) callbackStruct); - } - } -} diff --git a/Src/SteamworksNET/CallbackIdentityAttribute.cs b/Src/SteamworksNET/CallbackIdentityAttribute.cs deleted file mode 100644 index 922f00d7..00000000 --- a/Src/SteamworksNET/CallbackIdentityAttribute.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CallbackIdentityAttribute -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] - internal class CallbackIdentityAttribute : Attribute - { - public int Identity { get; set; } - - public CallbackIdentityAttribute(int callbackNum) => this.Identity = callbackNum; - } -} diff --git a/Src/SteamworksNET/CallbackMsg_t.cs b/Src/SteamworksNET/CallbackMsg_t.cs deleted file mode 100644 index 77f7c022..00000000 --- a/Src/SteamworksNET/CallbackMsg_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CallbackMsg_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct CallbackMsg_t - { - public int m_hSteamUser; - public int m_iCallback; - public IntPtr m_pubParam; - public int m_cubParam; - } -} diff --git a/Src/SteamworksNET/Callback`1.cs b/Src/SteamworksNET/Callback`1.cs deleted file mode 100644 index aa219ad3..00000000 --- a/Src/SteamworksNET/Callback`1.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.Callback`1 -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public sealed class Callback : IDisposable - { - private CCallbackBaseVTable VTable; - private IntPtr m_pVTable = IntPtr.Zero; - private CCallbackBase m_CCallbackBase; - private GCHandle m_pCCallbackBase; - private bool m_bGameServer; - private readonly int m_size = Marshal.SizeOf(typeof (T)); - private bool m_bDisposed; - - private event Callback.DispatchDelegate m_Func; - - public static Callback Create(Callback.DispatchDelegate func) => new Callback(func); - - public static Callback CreateGameServer(Callback.DispatchDelegate func) => new Callback(func, true); - - public Callback(Callback.DispatchDelegate func, bool bGameServer = false) - { - this.m_bGameServer = bGameServer; - this.BuildCCallbackBase(); - this.Register(func); - } - - ~Callback() => this.Dispose(); - - public void Dispose() - { - if (this.m_bDisposed) - return; - GC.SuppressFinalize((object) this); - this.Unregister(); - if (this.m_pVTable != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pVTable); - if (this.m_pCCallbackBase.IsAllocated) - this.m_pCCallbackBase.Free(); - this.m_bDisposed = true; - } - - public void Register(Callback.DispatchDelegate func) - { - if (func == null) - throw new Exception("Callback function must not be null."); - if (((int) this.m_CCallbackBase.m_nCallbackFlags & 1) == 1) - this.Unregister(); - if (this.m_bGameServer) - this.SetGameserverFlag(); - this.m_Func = func; - NativeMethods.SteamAPI_RegisterCallback(this.m_pCCallbackBase.AddrOfPinnedObject(), CallbackIdentities.GetCallbackIdentity(typeof (T))); - } - - public void Unregister() => NativeMethods.SteamAPI_UnregisterCallback(this.m_pCCallbackBase.AddrOfPinnedObject()); - - public void SetGameserverFlag() => this.m_CCallbackBase.m_nCallbackFlags |= (byte) 2; - - private void OnRunCallback(IntPtr thisptr, IntPtr pvParam) - { - try - { - this.m_Func((T) Marshal.PtrToStructure(pvParam, typeof (T))); - } - catch (Exception ex) - { - CallbackDispatcher.ExceptionHandler(ex); - } - } - - private void OnRunCallResult( - IntPtr thisptr, - IntPtr pvParam, - bool bFailed, - ulong hSteamAPICall) - { - try - { - this.m_Func((T) Marshal.PtrToStructure(pvParam, typeof (T))); - } - catch (Exception ex) - { - CallbackDispatcher.ExceptionHandler(ex); - } - } - - private int OnGetCallbackSizeBytes(IntPtr thisptr) => this.m_size; - - private void BuildCCallbackBase() - { - this.VTable = new CCallbackBaseVTable() - { - m_RunCallResult = new CCallbackBaseVTable.RunCRDel(this.OnRunCallResult), - m_RunCallback = new CCallbackBaseVTable.RunCBDel(this.OnRunCallback), - m_GetCallbackSizeBytes = new CCallbackBaseVTable.GetCallbackSizeBytesDel(this.OnGetCallbackSizeBytes) - }; - this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (CCallbackBaseVTable))); - Marshal.StructureToPtr((object) this.VTable, this.m_pVTable, false); - this.m_CCallbackBase = new CCallbackBase() - { - m_vfptr = this.m_pVTable, - m_nCallbackFlags = (byte) 0, - m_iCallback = CallbackIdentities.GetCallbackIdentity(typeof (T)) - }; - this.m_pCCallbackBase = GCHandle.Alloc((object) this.m_CCallbackBase, GCHandleType.Pinned); - } - - public delegate void DispatchDelegate(T param); - } -} diff --git a/Src/SteamworksNET/CheckFileSignature_t.cs b/Src/SteamworksNET/CheckFileSignature_t.cs deleted file mode 100644 index d0545139..00000000 --- a/Src/SteamworksNET/CheckFileSignature_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CheckFileSignature_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(705)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct CheckFileSignature_t - { - public const int k_iCallback = 705; - public ECheckFileSignature m_eCheckFileSignature; - } -} diff --git a/Src/SteamworksNET/ClanOfficerListResponse_t.cs b/Src/SteamworksNET/ClanOfficerListResponse_t.cs deleted file mode 100644 index 5378adce..00000000 --- a/Src/SteamworksNET/ClanOfficerListResponse_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ClanOfficerListResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(335)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct ClanOfficerListResponse_t - { - public const int k_iCallback = 335; - public CSteamID m_steamIDClan; - public int m_cOfficers; - public byte m_bSuccess; - } -} diff --git a/Src/SteamworksNET/ClientGameServerDeny_t.cs b/Src/SteamworksNET/ClientGameServerDeny_t.cs deleted file mode 100644 index 8112b1e7..00000000 --- a/Src/SteamworksNET/ClientGameServerDeny_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ClientGameServerDeny_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(113)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct ClientGameServerDeny_t - { - public const int k_iCallback = 113; - public uint m_uAppID; - public uint m_unGameServerIP; - public ushort m_usGameServerPort; - public ushort m_bSecure; - public uint m_uReason; - } -} diff --git a/Src/SteamworksNET/ClientUnifiedMessageHandle.cs b/Src/SteamworksNET/ClientUnifiedMessageHandle.cs deleted file mode 100644 index 7a68bfb7..00000000 --- a/Src/SteamworksNET/ClientUnifiedMessageHandle.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ClientUnifiedMessageHandle -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ClientUnifiedMessageHandle : - IEquatable, - IComparable - { - public static readonly ClientUnifiedMessageHandle Invalid = new ClientUnifiedMessageHandle(0UL); - public ulong m_ClientUnifiedMessageHandle; - - public ClientUnifiedMessageHandle(ulong value) => this.m_ClientUnifiedMessageHandle = value; - - public override string ToString() => this.m_ClientUnifiedMessageHandle.ToString(); - - public override bool Equals(object other) => other is ClientUnifiedMessageHandle unifiedMessageHandle && this == unifiedMessageHandle; - - public override int GetHashCode() => this.m_ClientUnifiedMessageHandle.GetHashCode(); - - public static bool operator ==(ClientUnifiedMessageHandle x, ClientUnifiedMessageHandle y) => (long) x.m_ClientUnifiedMessageHandle == (long) y.m_ClientUnifiedMessageHandle; - - public static bool operator !=(ClientUnifiedMessageHandle x, ClientUnifiedMessageHandle y) => !(x == y); - - public static explicit operator ClientUnifiedMessageHandle(ulong value) => new ClientUnifiedMessageHandle(value); - - public static explicit operator ulong(ClientUnifiedMessageHandle that) => that.m_ClientUnifiedMessageHandle; - - public bool Equals(ClientUnifiedMessageHandle other) => (long) this.m_ClientUnifiedMessageHandle == (long) other.m_ClientUnifiedMessageHandle; - - public int CompareTo(ClientUnifiedMessageHandle other) => this.m_ClientUnifiedMessageHandle.CompareTo(other.m_ClientUnifiedMessageHandle); - } -} diff --git a/Src/SteamworksNET/ComputeNewPlayerCompatibilityResult_t.cs b/Src/SteamworksNET/ComputeNewPlayerCompatibilityResult_t.cs deleted file mode 100644 index 9d56cdbe..00000000 --- a/Src/SteamworksNET/ComputeNewPlayerCompatibilityResult_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ComputeNewPlayerCompatibilityResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(211)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct ComputeNewPlayerCompatibilityResult_t - { - public const int k_iCallback = 211; - public EResult m_eResult; - public int m_cPlayersThatDontLikeCandidate; - public int m_cPlayersThatCandidateDoesntLike; - public int m_cClanPlayersThatDontLikeCandidate; - public CSteamID m_SteamIDCandidate; - } -} diff --git a/Src/SteamworksNET/Constants.cs b/Src/SteamworksNET/Constants.cs deleted file mode 100644 index f65ec722..00000000 --- a/Src/SteamworksNET/Constants.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.Constants -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class Constants - { - public const string STEAMAPPLIST_INTERFACE_VERSION = "STEAMAPPLIST_INTERFACE_VERSION001"; - public const string STEAMAPPS_INTERFACE_VERSION = "STEAMAPPS_INTERFACE_VERSION008"; - public const string STEAMAPPTICKET_INTERFACE_VERSION = "STEAMAPPTICKET_INTERFACE_VERSION001"; - public const string STEAMCLIENT_INTERFACE_VERSION = "SteamClient017"; - public const string STEAMCONTROLLER_INTERFACE_VERSION = "SteamController005"; - public const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends015"; - public const string STEAMGAMECOORDINATOR_INTERFACE_VERSION = "SteamGameCoordinator001"; - public const string STEAMGAMESERVER_INTERFACE_VERSION = "SteamGameServer012"; - public const string STEAMGAMESERVERSTATS_INTERFACE_VERSION = "SteamGameServerStats001"; - public const string STEAMHTMLSURFACE_INTERFACE_VERSION = "STEAMHTMLSURFACE_INTERFACE_VERSION_003"; - public const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION002"; - public const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V001"; - public const string STEAMMATCHMAKING_INTERFACE_VERSION = "SteamMatchMaking009"; - public const string STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION = "SteamMatchMakingServers002"; - public const string STEAMMUSIC_INTERFACE_VERSION = "STEAMMUSIC_INTERFACE_VERSION001"; - public const string STEAMMUSICREMOTE_INTERFACE_VERSION = "STEAMMUSICREMOTE_INTERFACE_VERSION001"; - public const string STEAMNETWORKING_INTERFACE_VERSION = "SteamNetworking005"; - public const string STEAMREMOTESTORAGE_INTERFACE_VERSION = "STEAMREMOTESTORAGE_INTERFACE_VERSION014"; - public const string STEAMSCREENSHOTS_INTERFACE_VERSION = "STEAMSCREENSHOTS_INTERFACE_VERSION003"; - public const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION009"; - public const string STEAMUNIFIEDMESSAGES_INTERFACE_VERSION = "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001"; - public const string STEAMUSER_INTERFACE_VERSION = "SteamUser019"; - public const string STEAMUSERSTATS_INTERFACE_VERSION = "STEAMUSERSTATS_INTERFACE_VERSION011"; - public const string STEAMUTILS_INTERFACE_VERSION = "SteamUtils008"; - public const string STEAMVIDEO_INTERFACE_VERSION = "STEAMVIDEO_INTERFACE_V001"; - public const int k_cubAppProofOfPurchaseKeyMax = 240; - public const int k_iSteamUserCallbacks = 100; - public const int k_iSteamGameServerCallbacks = 200; - public const int k_iSteamFriendsCallbacks = 300; - public const int k_iSteamBillingCallbacks = 400; - public const int k_iSteamMatchmakingCallbacks = 500; - public const int k_iSteamContentServerCallbacks = 600; - public const int k_iSteamUtilsCallbacks = 700; - public const int k_iClientFriendsCallbacks = 800; - public const int k_iClientUserCallbacks = 900; - public const int k_iSteamAppsCallbacks = 1000; - public const int k_iSteamUserStatsCallbacks = 1100; - public const int k_iSteamNetworkingCallbacks = 1200; - public const int k_iClientRemoteStorageCallbacks = 1300; - public const int k_iClientDepotBuilderCallbacks = 1400; - public const int k_iSteamGameServerItemsCallbacks = 1500; - public const int k_iClientUtilsCallbacks = 1600; - public const int k_iSteamGameCoordinatorCallbacks = 1700; - public const int k_iSteamGameServerStatsCallbacks = 1800; - public const int k_iSteam2AsyncCallbacks = 1900; - public const int k_iSteamGameStatsCallbacks = 2000; - public const int k_iClientHTTPCallbacks = 2100; - public const int k_iClientScreenshotsCallbacks = 2200; - public const int k_iSteamScreenshotsCallbacks = 2300; - public const int k_iClientAudioCallbacks = 2400; - public const int k_iClientUnifiedMessagesCallbacks = 2500; - public const int k_iSteamStreamLauncherCallbacks = 2600; - public const int k_iClientControllerCallbacks = 2700; - public const int k_iSteamControllerCallbacks = 2800; - public const int k_iClientParentalSettingsCallbacks = 2900; - public const int k_iClientDeviceAuthCallbacks = 3000; - public const int k_iClientNetworkDeviceManagerCallbacks = 3100; - public const int k_iClientMusicCallbacks = 3200; - public const int k_iClientRemoteClientManagerCallbacks = 3300; - public const int k_iClientUGCCallbacks = 3400; - public const int k_iSteamStreamClientCallbacks = 3500; - public const int k_IClientProductBuilderCallbacks = 3600; - public const int k_iClientShortcutsCallbacks = 3700; - public const int k_iClientRemoteControlManagerCallbacks = 3800; - public const int k_iSteamAppListCallbacks = 3900; - public const int k_iSteamMusicCallbacks = 4000; - public const int k_iSteamMusicRemoteCallbacks = 4100; - public const int k_iClientVRCallbacks = 4200; - public const int k_iClientGameNotificationCallbacks = 4300; - public const int k_iSteamGameNotificationCallbacks = 4400; - public const int k_iSteamHTMLSurfaceCallbacks = 4500; - public const int k_iClientVideoCallbacks = 4600; - public const int k_iClientInventoryCallbacks = 4700; - public const int k_iClientBluetoothManagerCallbacks = 4800; - public const int k_cchMaxFriendsGroupName = 64; - public const int k_cFriendsGroupLimit = 100; - public const int k_cEnumerateFollowersMax = 50; - public const int k_cchPersonaNameMax = 128; - public const int k_cwchPersonaNameMax = 32; - public const int k_cubChatMetadataMax = 8192; - public const int k_cchMaxRichPresenceKeys = 20; - public const int k_cchMaxRichPresenceKeyLength = 64; - public const int k_cchMaxRichPresenceValueLength = 256; - public const int k_unServerFlagNone = 0; - public const int k_unServerFlagActive = 1; - public const int k_unServerFlagSecure = 2; - public const int k_unServerFlagDedicated = 4; - public const int k_unServerFlagLinux = 8; - public const int k_unServerFlagPassworded = 16; - public const int k_unServerFlagPrivate = 32; - public const int k_unFavoriteFlagNone = 0; - public const int k_unFavoriteFlagFavorite = 1; - public const int k_unFavoriteFlagHistory = 2; - public const int k_unMaxCloudFileChunkSize = 104857600; - public const int k_cchPublishedDocumentTitleMax = 129; - public const int k_cchPublishedDocumentDescriptionMax = 8000; - public const int k_cchPublishedDocumentChangeDescriptionMax = 8000; - public const int k_unEnumeratePublishedFilesMaxResults = 50; - public const int k_cchTagListMax = 1025; - public const int k_cchFilenameMax = 260; - public const int k_cchPublishedFileURLMax = 256; - public const int k_nScreenshotMaxTaggedUsers = 32; - public const int k_nScreenshotMaxTaggedPublishedFiles = 32; - public const int k_cubUFSTagTypeMax = 255; - public const int k_cubUFSTagValueMax = 255; - public const int k_ScreenshotThumbWidth = 200; - public const int kNumUGCResultsPerPage = 50; - public const int k_cchDeveloperMetadataMax = 5000; - public const int k_cchStatNameMax = 128; - public const int k_cchLeaderboardNameMax = 128; - public const int k_cLeaderboardDetailsMax = 64; - public const int k_cbMaxGameServerGameDir = 32; - public const int k_cbMaxGameServerMapName = 32; - public const int k_cbMaxGameServerGameDescription = 64; - public const int k_cbMaxGameServerName = 64; - public const int k_cbMaxGameServerTags = 128; - public const int k_cbMaxGameServerGameData = 2048; - public const int k_unSteamAccountIDMask = -1; - public const int k_unSteamAccountInstanceMask = 1048575; - public const int k_unSteamUserDesktopInstance = 1; - public const int k_unSteamUserConsoleInstance = 2; - public const int k_unSteamUserWebInstance = 4; - public const int k_cchGameExtraInfoMax = 64; - public const int k_nSteamEncryptedAppTicketSymmetricKeyLen = 32; - public const int k_cubSaltSize = 8; - public const ulong k_GIDNil = 18446744073709551615; - public const ulong k_TxnIDNil = 18446744073709551615; - public const ulong k_TxnIDUnknown = 0; - public const int k_uPackageIdFreeSub = 0; - public const int k_uPackageIdInvalid = -1; - public const ulong k_ulAssetClassIdInvalid = 0; - public const int k_uPhysicalItemIdInvalid = 0; - public const int k_uCellIDInvalid = -1; - public const int k_uPartnerIdInvalid = 0; - public const int STEAM_CONTROLLER_MAX_COUNT = 16; - public const int STEAM_CONTROLLER_MAX_ANALOG_ACTIONS = 16; - public const int STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS = 128; - public const int STEAM_CONTROLLER_MAX_ORIGINS = 8; - public const ulong STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS = 18446744073709551615; - public const float STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA = -1f; - public const float STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA = 1f; - public const ushort MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = 65535; - public const int INVALID_HTTPREQUEST_HANDLE = 0; - public const byte k_nMaxLobbyKeyLength = 255; - public const int k_SteamMusicNameMaxLength = 255; - public const int k_SteamMusicPNGMaxLength = 65535; - public const int QUERY_PORT_NOT_INITIALIZED = 65535; - public const int QUERY_PORT_ERROR = 65534; - } -} diff --git a/Src/SteamworksNET/ControllerActionSetHandle_t.cs b/Src/SteamworksNET/ControllerActionSetHandle_t.cs deleted file mode 100644 index f54db43b..00000000 --- a/Src/SteamworksNET/ControllerActionSetHandle_t.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerActionSetHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ControllerActionSetHandle_t : - IEquatable, - IComparable - { - public ulong m_ControllerActionSetHandle; - - public ControllerActionSetHandle_t(ulong value) => this.m_ControllerActionSetHandle = value; - - public override string ToString() => this.m_ControllerActionSetHandle.ToString(); - - public override bool Equals(object other) => other is ControllerActionSetHandle_t actionSetHandleT && this == actionSetHandleT; - - public override int GetHashCode() => this.m_ControllerActionSetHandle.GetHashCode(); - - public static bool operator ==(ControllerActionSetHandle_t x, ControllerActionSetHandle_t y) => (long) x.m_ControllerActionSetHandle == (long) y.m_ControllerActionSetHandle; - - public static bool operator !=(ControllerActionSetHandle_t x, ControllerActionSetHandle_t y) => !(x == y); - - public static explicit operator ControllerActionSetHandle_t(ulong value) => new ControllerActionSetHandle_t(value); - - public static explicit operator ulong(ControllerActionSetHandle_t that) => that.m_ControllerActionSetHandle; - - public bool Equals(ControllerActionSetHandle_t other) => (long) this.m_ControllerActionSetHandle == (long) other.m_ControllerActionSetHandle; - - public int CompareTo(ControllerActionSetHandle_t other) => this.m_ControllerActionSetHandle.CompareTo(other.m_ControllerActionSetHandle); - } -} diff --git a/Src/SteamworksNET/ControllerAnalogActionData_t.cs b/Src/SteamworksNET/ControllerAnalogActionData_t.cs deleted file mode 100644 index 3417e466..00000000 --- a/Src/SteamworksNET/ControllerAnalogActionData_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerAnalogActionData_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ControllerAnalogActionData_t - { - public EControllerSourceMode eMode; - public float x; - public float y; - public byte bActive; - } -} diff --git a/Src/SteamworksNET/ControllerAnalogActionHandle_t.cs b/Src/SteamworksNET/ControllerAnalogActionHandle_t.cs deleted file mode 100644 index 402c99cc..00000000 --- a/Src/SteamworksNET/ControllerAnalogActionHandle_t.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerAnalogActionHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ControllerAnalogActionHandle_t : - IEquatable, - IComparable - { - public ulong m_ControllerAnalogActionHandle; - - public ControllerAnalogActionHandle_t(ulong value) => this.m_ControllerAnalogActionHandle = value; - - public override string ToString() => this.m_ControllerAnalogActionHandle.ToString(); - - public override bool Equals(object other) => other is ControllerAnalogActionHandle_t analogActionHandleT && this == analogActionHandleT; - - public override int GetHashCode() => this.m_ControllerAnalogActionHandle.GetHashCode(); - - public static bool operator ==( - ControllerAnalogActionHandle_t x, - ControllerAnalogActionHandle_t y) - { - return (long) x.m_ControllerAnalogActionHandle == (long) y.m_ControllerAnalogActionHandle; - } - - public static bool operator !=( - ControllerAnalogActionHandle_t x, - ControllerAnalogActionHandle_t y) - { - return !(x == y); - } - - public static explicit operator ControllerAnalogActionHandle_t(ulong value) => new ControllerAnalogActionHandle_t(value); - - public static explicit operator ulong(ControllerAnalogActionHandle_t that) => that.m_ControllerAnalogActionHandle; - - public bool Equals(ControllerAnalogActionHandle_t other) => (long) this.m_ControllerAnalogActionHandle == (long) other.m_ControllerAnalogActionHandle; - - public int CompareTo(ControllerAnalogActionHandle_t other) => this.m_ControllerAnalogActionHandle.CompareTo(other.m_ControllerAnalogActionHandle); - } -} diff --git a/Src/SteamworksNET/ControllerDigitalActionData_t.cs b/Src/SteamworksNET/ControllerDigitalActionData_t.cs deleted file mode 100644 index 9596792f..00000000 --- a/Src/SteamworksNET/ControllerDigitalActionData_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerDigitalActionData_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ControllerDigitalActionData_t - { - public byte bState; - public byte bActive; - } -} diff --git a/Src/SteamworksNET/ControllerDigitalActionHandle_t.cs b/Src/SteamworksNET/ControllerDigitalActionHandle_t.cs deleted file mode 100644 index 0bd5466c..00000000 --- a/Src/SteamworksNET/ControllerDigitalActionHandle_t.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerDigitalActionHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ControllerDigitalActionHandle_t : - IEquatable, - IComparable - { - public ulong m_ControllerDigitalActionHandle; - - public ControllerDigitalActionHandle_t(ulong value) => this.m_ControllerDigitalActionHandle = value; - - public override string ToString() => this.m_ControllerDigitalActionHandle.ToString(); - - public override bool Equals(object other) => other is ControllerDigitalActionHandle_t digitalActionHandleT && this == digitalActionHandleT; - - public override int GetHashCode() => this.m_ControllerDigitalActionHandle.GetHashCode(); - - public static bool operator ==( - ControllerDigitalActionHandle_t x, - ControllerDigitalActionHandle_t y) - { - return (long) x.m_ControllerDigitalActionHandle == (long) y.m_ControllerDigitalActionHandle; - } - - public static bool operator !=( - ControllerDigitalActionHandle_t x, - ControllerDigitalActionHandle_t y) - { - return !(x == y); - } - - public static explicit operator ControllerDigitalActionHandle_t(ulong value) => new ControllerDigitalActionHandle_t(value); - - public static explicit operator ulong(ControllerDigitalActionHandle_t that) => that.m_ControllerDigitalActionHandle; - - public bool Equals(ControllerDigitalActionHandle_t other) => (long) this.m_ControllerDigitalActionHandle == (long) other.m_ControllerDigitalActionHandle; - - public int CompareTo(ControllerDigitalActionHandle_t other) => this.m_ControllerDigitalActionHandle.CompareTo(other.m_ControllerDigitalActionHandle); - } -} diff --git a/Src/SteamworksNET/ControllerHandle_t.cs b/Src/SteamworksNET/ControllerHandle_t.cs deleted file mode 100644 index 682ed884..00000000 --- a/Src/SteamworksNET/ControllerHandle_t.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ControllerHandle_t : IEquatable, IComparable - { - public ulong m_ControllerHandle; - - public ControllerHandle_t(ulong value) => this.m_ControllerHandle = value; - - public override string ToString() => this.m_ControllerHandle.ToString(); - - public override bool Equals(object other) => other is ControllerHandle_t controllerHandleT && this == controllerHandleT; - - public override int GetHashCode() => this.m_ControllerHandle.GetHashCode(); - - public static bool operator ==(ControllerHandle_t x, ControllerHandle_t y) => (long) x.m_ControllerHandle == (long) y.m_ControllerHandle; - - public static bool operator !=(ControllerHandle_t x, ControllerHandle_t y) => !(x == y); - - public static explicit operator ControllerHandle_t(ulong value) => new ControllerHandle_t(value); - - public static explicit operator ulong(ControllerHandle_t that) => that.m_ControllerHandle; - - public bool Equals(ControllerHandle_t other) => (long) this.m_ControllerHandle == (long) other.m_ControllerHandle; - - public int CompareTo(ControllerHandle_t other) => this.m_ControllerHandle.CompareTo(other.m_ControllerHandle); - } -} diff --git a/Src/SteamworksNET/ControllerMotionData_t.cs b/Src/SteamworksNET/ControllerMotionData_t.cs deleted file mode 100644 index b583177b..00000000 --- a/Src/SteamworksNET/ControllerMotionData_t.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ControllerMotionData_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct ControllerMotionData_t - { - public float rotQuatX; - public float rotQuatY; - public float rotQuatZ; - public float rotQuatW; - public float posAccelX; - public float posAccelY; - public float posAccelZ; - public float rotVelX; - public float rotVelY; - public float rotVelZ; - } -} diff --git a/Src/SteamworksNET/CreateItemResult_t.cs b/Src/SteamworksNET/CreateItemResult_t.cs deleted file mode 100644 index b7a3f0be..00000000 --- a/Src/SteamworksNET/CreateItemResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.CreateItemResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3403)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct CreateItemResult_t - { - public const int k_iCallback = 3403; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; - } -} diff --git a/Src/SteamworksNET/DepotId_t.cs b/Src/SteamworksNET/DepotId_t.cs deleted file mode 100644 index 8a9d6034..00000000 --- a/Src/SteamworksNET/DepotId_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.DepotId_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct DepotId_t : IEquatable, IComparable - { - public static readonly DepotId_t Invalid = new DepotId_t(0U); - public uint m_DepotId; - - public DepotId_t(uint value) => this.m_DepotId = value; - - public override string ToString() => this.m_DepotId.ToString(); - - public override bool Equals(object other) => other is DepotId_t depotIdT && this == depotIdT; - - public override int GetHashCode() => this.m_DepotId.GetHashCode(); - - public static bool operator ==(DepotId_t x, DepotId_t y) => (int) x.m_DepotId == (int) y.m_DepotId; - - public static bool operator !=(DepotId_t x, DepotId_t y) => !(x == y); - - public static explicit operator DepotId_t(uint value) => new DepotId_t(value); - - public static explicit operator uint(DepotId_t that) => that.m_DepotId; - - public bool Equals(DepotId_t other) => (int) this.m_DepotId == (int) other.m_DepotId; - - public int CompareTo(DepotId_t other) => this.m_DepotId.CompareTo(other.m_DepotId); - } -} diff --git a/Src/SteamworksNET/DlcInstalled_t.cs b/Src/SteamworksNET/DlcInstalled_t.cs deleted file mode 100644 index 2b4058c6..00000000 --- a/Src/SteamworksNET/DlcInstalled_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.DlcInstalled_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1005)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct DlcInstalled_t - { - public const int k_iCallback = 1005; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/DllCheck.cs b/Src/SteamworksNET/DllCheck.cs deleted file mode 100644 index 644ed25b..00000000 --- a/Src/SteamworksNET/DllCheck.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.DllCheck -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public class DllCheck - { - public static bool Test() => true; - } -} diff --git a/Src/SteamworksNET/DownloadClanActivityCountsResult_t.cs b/Src/SteamworksNET/DownloadClanActivityCountsResult_t.cs deleted file mode 100644 index 36d71d1f..00000000 --- a/Src/SteamworksNET/DownloadClanActivityCountsResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.DownloadClanActivityCountsResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(341)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct DownloadClanActivityCountsResult_t - { - public const int k_iCallback = 341; - [MarshalAs(UnmanagedType.I1)] - public bool m_bSuccess; - } -} diff --git a/Src/SteamworksNET/DownloadItemResult_t.cs b/Src/SteamworksNET/DownloadItemResult_t.cs deleted file mode 100644 index 37c39a3c..00000000 --- a/Src/SteamworksNET/DownloadItemResult_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.DownloadItemResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3406)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct DownloadItemResult_t - { - public const int k_iCallback = 3406; - public AppId_t m_unAppID; - public PublishedFileId_t m_nPublishedFileId; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/EAccountType.cs b/Src/SteamworksNET/EAccountType.cs deleted file mode 100644 index 0722eca9..00000000 --- a/Src/SteamworksNET/EAccountType.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EAccountType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EAccountType - { - k_EAccountTypeInvalid, - k_EAccountTypeIndividual, - k_EAccountTypeMultiseat, - k_EAccountTypeGameServer, - k_EAccountTypeAnonGameServer, - k_EAccountTypePending, - k_EAccountTypeContentServer, - k_EAccountTypeClan, - k_EAccountTypeChat, - k_EAccountTypeConsoleUser, - k_EAccountTypeAnonUser, - k_EAccountTypeMax, - } -} diff --git a/Src/SteamworksNET/EAppOwnershipFlags.cs b/Src/SteamworksNET/EAppOwnershipFlags.cs deleted file mode 100644 index 3d47fa2e..00000000 --- a/Src/SteamworksNET/EAppOwnershipFlags.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EAppOwnershipFlags -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EAppOwnershipFlags - { - k_EAppOwnershipFlags_None = 0, - k_EAppOwnershipFlags_OwnsLicense = 1, - k_EAppOwnershipFlags_FreeLicense = 2, - k_EAppOwnershipFlags_RegionRestricted = 4, - k_EAppOwnershipFlags_LowViolence = 8, - k_EAppOwnershipFlags_InvalidPlatform = 16, // 0x00000010 - k_EAppOwnershipFlags_SharedLicense = 32, // 0x00000020 - k_EAppOwnershipFlags_FreeWeekend = 64, // 0x00000040 - k_EAppOwnershipFlags_RetailLicense = 128, // 0x00000080 - k_EAppOwnershipFlags_LicenseLocked = 256, // 0x00000100 - k_EAppOwnershipFlags_LicensePending = 512, // 0x00000200 - k_EAppOwnershipFlags_LicenseExpired = 1024, // 0x00000400 - k_EAppOwnershipFlags_LicensePermanent = 2048, // 0x00000800 - k_EAppOwnershipFlags_LicenseRecurring = 4096, // 0x00001000 - k_EAppOwnershipFlags_LicenseCanceled = 8192, // 0x00002000 - k_EAppOwnershipFlags_AutoGrant = 16384, // 0x00004000 - k_EAppOwnershipFlags_PendingGift = 32768, // 0x00008000 - k_EAppOwnershipFlags_RentalNotActivated = 65536, // 0x00010000 - k_EAppOwnershipFlags_Rental = 131072, // 0x00020000 - } -} diff --git a/Src/SteamworksNET/EAppReleaseState.cs b/Src/SteamworksNET/EAppReleaseState.cs deleted file mode 100644 index b8b2ebcf..00000000 --- a/Src/SteamworksNET/EAppReleaseState.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EAppReleaseState -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EAppReleaseState - { - k_EAppReleaseState_Unknown, - k_EAppReleaseState_Unavailable, - k_EAppReleaseState_Prerelease, - k_EAppReleaseState_PreloadOnly, - k_EAppReleaseState_Released, - } -} diff --git a/Src/SteamworksNET/EAppType.cs b/Src/SteamworksNET/EAppType.cs deleted file mode 100644 index feab3db7..00000000 --- a/Src/SteamworksNET/EAppType.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EAppType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EAppType - { - k_EAppType_Invalid = 0, - k_EAppType_Game = 1, - k_EAppType_Application = 2, - k_EAppType_Tool = 4, - k_EAppType_Demo = 8, - k_EAppType_Media_DEPRECATED = 16, // 0x00000010 - k_EAppType_DLC = 32, // 0x00000020 - k_EAppType_Guide = 64, // 0x00000040 - k_EAppType_Driver = 128, // 0x00000080 - k_EAppType_Config = 256, // 0x00000100 - k_EAppType_Hardware = 512, // 0x00000200 - k_EAppType_Franchise = 1024, // 0x00000400 - k_EAppType_Video = 2048, // 0x00000800 - k_EAppType_Plugin = 4096, // 0x00001000 - k_EAppType_Music = 8192, // 0x00002000 - k_EAppType_Series = 16384, // 0x00004000 - k_EAppType_Shortcut = 1073741824, // 0x40000000 - k_EAppType_DepotOnly = -2147483647, // 0x80000001 - } -} diff --git a/Src/SteamworksNET/EAuthSessionResponse.cs b/Src/SteamworksNET/EAuthSessionResponse.cs deleted file mode 100644 index 0ae8d315..00000000 --- a/Src/SteamworksNET/EAuthSessionResponse.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EAuthSessionResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EAuthSessionResponse - { - k_EAuthSessionResponseOK, - k_EAuthSessionResponseUserNotConnectedToSteam, - k_EAuthSessionResponseNoLicenseOrExpired, - k_EAuthSessionResponseVACBanned, - k_EAuthSessionResponseLoggedInElseWhere, - k_EAuthSessionResponseVACCheckTimedOut, - k_EAuthSessionResponseAuthTicketCanceled, - k_EAuthSessionResponseAuthTicketInvalidAlreadyUsed, - k_EAuthSessionResponseAuthTicketInvalid, - k_EAuthSessionResponsePublisherIssuedBan, - } -} diff --git a/Src/SteamworksNET/EBeginAuthSessionResult.cs b/Src/SteamworksNET/EBeginAuthSessionResult.cs deleted file mode 100644 index f5caeec3..00000000 --- a/Src/SteamworksNET/EBeginAuthSessionResult.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EBeginAuthSessionResult -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EBeginAuthSessionResult - { - k_EBeginAuthSessionResultOK, - k_EBeginAuthSessionResultInvalidTicket, - k_EBeginAuthSessionResultDuplicateRequest, - k_EBeginAuthSessionResultInvalidVersion, - k_EBeginAuthSessionResultGameMismatch, - k_EBeginAuthSessionResultExpiredTicket, - } -} diff --git a/Src/SteamworksNET/EBroadcastUploadResult.cs b/Src/SteamworksNET/EBroadcastUploadResult.cs deleted file mode 100644 index 98685b07..00000000 --- a/Src/SteamworksNET/EBroadcastUploadResult.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EBroadcastUploadResult -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EBroadcastUploadResult - { - k_EBroadcastUploadResultNone, - k_EBroadcastUploadResultOK, - k_EBroadcastUploadResultInitFailed, - k_EBroadcastUploadResultFrameFailed, - k_EBroadcastUploadResultTimeout, - k_EBroadcastUploadResultBandwidthExceeded, - k_EBroadcastUploadResultLowFPS, - k_EBroadcastUploadResultMissingKeyFrames, - k_EBroadcastUploadResultNoConnection, - k_EBroadcastUploadResultRelayFailed, - k_EBroadcastUploadResultSettingsChanged, - k_EBroadcastUploadResultMissingAudio, - k_EBroadcastUploadResultTooFarBehind, - k_EBroadcastUploadResultTranscodeBehind, - } -} diff --git a/Src/SteamworksNET/EChatEntryType.cs b/Src/SteamworksNET/EChatEntryType.cs deleted file mode 100644 index 850ce4cc..00000000 --- a/Src/SteamworksNET/EChatEntryType.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EChatEntryType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EChatEntryType - { - k_EChatEntryTypeInvalid = 0, - k_EChatEntryTypeChatMsg = 1, - k_EChatEntryTypeTyping = 2, - k_EChatEntryTypeInviteGame = 3, - k_EChatEntryTypeEmote = 4, - k_EChatEntryTypeLeftConversation = 6, - k_EChatEntryTypeEntered = 7, - k_EChatEntryTypeWasKicked = 8, - k_EChatEntryTypeWasBanned = 9, - k_EChatEntryTypeDisconnected = 10, // 0x0000000A - k_EChatEntryTypeHistoricalChat = 11, // 0x0000000B - k_EChatEntryTypeLinkBlocked = 14, // 0x0000000E - } -} diff --git a/Src/SteamworksNET/EChatMemberStateChange.cs b/Src/SteamworksNET/EChatMemberStateChange.cs deleted file mode 100644 index bc88b4b7..00000000 --- a/Src/SteamworksNET/EChatMemberStateChange.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EChatMemberStateChange -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EChatMemberStateChange - { - k_EChatMemberStateChangeEntered = 1, - k_EChatMemberStateChangeLeft = 2, - k_EChatMemberStateChangeDisconnected = 4, - k_EChatMemberStateChangeKicked = 8, - k_EChatMemberStateChangeBanned = 16, // 0x00000010 - } -} diff --git a/Src/SteamworksNET/EChatRoomEnterResponse.cs b/Src/SteamworksNET/EChatRoomEnterResponse.cs deleted file mode 100644 index 2c03eb8c..00000000 --- a/Src/SteamworksNET/EChatRoomEnterResponse.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EChatRoomEnterResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EChatRoomEnterResponse - { - k_EChatRoomEnterResponseSuccess = 1, - k_EChatRoomEnterResponseDoesntExist = 2, - k_EChatRoomEnterResponseNotAllowed = 3, - k_EChatRoomEnterResponseFull = 4, - k_EChatRoomEnterResponseError = 5, - k_EChatRoomEnterResponseBanned = 6, - k_EChatRoomEnterResponseLimited = 7, - k_EChatRoomEnterResponseClanDisabled = 8, - k_EChatRoomEnterResponseCommunityBan = 9, - k_EChatRoomEnterResponseMemberBlockedYou = 10, // 0x0000000A - k_EChatRoomEnterResponseYouBlockedMember = 11, // 0x0000000B - } -} diff --git a/Src/SteamworksNET/EChatSteamIDInstanceFlags.cs b/Src/SteamworksNET/EChatSteamIDInstanceFlags.cs deleted file mode 100644 index 9c1689ff..00000000 --- a/Src/SteamworksNET/EChatSteamIDInstanceFlags.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EChatSteamIDInstanceFlags -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EChatSteamIDInstanceFlags - { - k_EChatAccountInstanceMask = 4095, // 0x00000FFF - k_EChatInstanceFlagClan = 524288, // 0x00080000 - k_EChatInstanceFlagLobby = 262144, // 0x00040000 - k_EChatInstanceFlagMMSLobby = 131072, // 0x00020000 - } -} diff --git a/Src/SteamworksNET/ECheckFileSignature.cs b/Src/SteamworksNET/ECheckFileSignature.cs deleted file mode 100644 index 6e026eb7..00000000 --- a/Src/SteamworksNET/ECheckFileSignature.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ECheckFileSignature -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ECheckFileSignature - { - k_ECheckFileSignatureInvalidSignature, - k_ECheckFileSignatureValidSignature, - k_ECheckFileSignatureFileNotFound, - k_ECheckFileSignatureNoSignaturesFoundForThisApp, - k_ECheckFileSignatureNoSignaturesFoundForThisFile, - } -} diff --git a/Src/SteamworksNET/EControllerActionOrigin.cs b/Src/SteamworksNET/EControllerActionOrigin.cs deleted file mode 100644 index 3c0d04df..00000000 --- a/Src/SteamworksNET/EControllerActionOrigin.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EControllerActionOrigin -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EControllerActionOrigin - { - k_EControllerActionOrigin_None, - k_EControllerActionOrigin_A, - k_EControllerActionOrigin_B, - k_EControllerActionOrigin_X, - k_EControllerActionOrigin_Y, - k_EControllerActionOrigin_LeftBumper, - k_EControllerActionOrigin_RightBumper, - k_EControllerActionOrigin_LeftGrip, - k_EControllerActionOrigin_RightGrip, - k_EControllerActionOrigin_Start, - k_EControllerActionOrigin_Back, - k_EControllerActionOrigin_LeftPad_Touch, - k_EControllerActionOrigin_LeftPad_Swipe, - k_EControllerActionOrigin_LeftPad_Click, - k_EControllerActionOrigin_LeftPad_DPadNorth, - k_EControllerActionOrigin_LeftPad_DPadSouth, - k_EControllerActionOrigin_LeftPad_DPadWest, - k_EControllerActionOrigin_LeftPad_DPadEast, - k_EControllerActionOrigin_RightPad_Touch, - k_EControllerActionOrigin_RightPad_Swipe, - k_EControllerActionOrigin_RightPad_Click, - k_EControllerActionOrigin_RightPad_DPadNorth, - k_EControllerActionOrigin_RightPad_DPadSouth, - k_EControllerActionOrigin_RightPad_DPadWest, - k_EControllerActionOrigin_RightPad_DPadEast, - k_EControllerActionOrigin_LeftTrigger_Pull, - k_EControllerActionOrigin_LeftTrigger_Click, - k_EControllerActionOrigin_RightTrigger_Pull, - k_EControllerActionOrigin_RightTrigger_Click, - k_EControllerActionOrigin_LeftStick_Move, - k_EControllerActionOrigin_LeftStick_Click, - k_EControllerActionOrigin_LeftStick_DPadNorth, - k_EControllerActionOrigin_LeftStick_DPadSouth, - k_EControllerActionOrigin_LeftStick_DPadWest, - k_EControllerActionOrigin_LeftStick_DPadEast, - k_EControllerActionOrigin_Gyro_Move, - k_EControllerActionOrigin_Gyro_Pitch, - k_EControllerActionOrigin_Gyro_Yaw, - k_EControllerActionOrigin_Gyro_Roll, - k_EControllerActionOrigin_PS4_X, - k_EControllerActionOrigin_PS4_Circle, - k_EControllerActionOrigin_PS4_Triangle, - k_EControllerActionOrigin_PS4_Square, - k_EControllerActionOrigin_PS4_LeftBumper, - k_EControllerActionOrigin_PS4_RightBumper, - k_EControllerActionOrigin_PS4_Options, - k_EControllerActionOrigin_PS4_Share, - k_EControllerActionOrigin_PS4_LeftPad_Touch, - k_EControllerActionOrigin_PS4_LeftPad_Swipe, - k_EControllerActionOrigin_PS4_LeftPad_Click, - k_EControllerActionOrigin_PS4_LeftPad_DPadNorth, - k_EControllerActionOrigin_PS4_LeftPad_DPadSouth, - k_EControllerActionOrigin_PS4_LeftPad_DPadWest, - k_EControllerActionOrigin_PS4_LeftPad_DPadEast, - k_EControllerActionOrigin_PS4_RightPad_Touch, - k_EControllerActionOrigin_PS4_RightPad_Swipe, - k_EControllerActionOrigin_PS4_RightPad_Click, - k_EControllerActionOrigin_PS4_RightPad_DPadNorth, - k_EControllerActionOrigin_PS4_RightPad_DPadSouth, - k_EControllerActionOrigin_PS4_RightPad_DPadWest, - k_EControllerActionOrigin_PS4_RightPad_DPadEast, - k_EControllerActionOrigin_PS4_CenterPad_Touch, - k_EControllerActionOrigin_PS4_CenterPad_Swipe, - k_EControllerActionOrigin_PS4_CenterPad_Click, - k_EControllerActionOrigin_PS4_CenterPad_DPadNorth, - k_EControllerActionOrigin_PS4_CenterPad_DPadSouth, - k_EControllerActionOrigin_PS4_CenterPad_DPadWest, - k_EControllerActionOrigin_PS4_CenterPad_DPadEast, - k_EControllerActionOrigin_PS4_LeftTrigger_Pull, - k_EControllerActionOrigin_PS4_LeftTrigger_Click, - k_EControllerActionOrigin_PS4_RightTrigger_Pull, - k_EControllerActionOrigin_PS4_RightTrigger_Click, - k_EControllerActionOrigin_PS4_LeftStick_Move, - k_EControllerActionOrigin_PS4_LeftStick_Click, - k_EControllerActionOrigin_PS4_LeftStick_DPadNorth, - k_EControllerActionOrigin_PS4_LeftStick_DPadSouth, - k_EControllerActionOrigin_PS4_LeftStick_DPadWest, - k_EControllerActionOrigin_PS4_LeftStick_DPadEast, - k_EControllerActionOrigin_PS4_RightStick_Move, - k_EControllerActionOrigin_PS4_RightStick_Click, - k_EControllerActionOrigin_PS4_RightStick_DPadNorth, - k_EControllerActionOrigin_PS4_RightStick_DPadSouth, - k_EControllerActionOrigin_PS4_RightStick_DPadWest, - k_EControllerActionOrigin_PS4_RightStick_DPadEast, - k_EControllerActionOrigin_PS4_DPad_North, - k_EControllerActionOrigin_PS4_DPad_South, - k_EControllerActionOrigin_PS4_DPad_West, - k_EControllerActionOrigin_PS4_DPad_East, - k_EControllerActionOrigin_PS4_Gyro_Move, - k_EControllerActionOrigin_PS4_Gyro_Pitch, - k_EControllerActionOrigin_PS4_Gyro_Yaw, - k_EControllerActionOrigin_PS4_Gyro_Roll, - k_EControllerActionOrigin_XBoxOne_A, - k_EControllerActionOrigin_XBoxOne_B, - k_EControllerActionOrigin_XBoxOne_X, - k_EControllerActionOrigin_XBoxOne_Y, - k_EControllerActionOrigin_XBoxOne_LeftBumper, - k_EControllerActionOrigin_XBoxOne_RightBumper, - k_EControllerActionOrigin_XBoxOne_Menu, - k_EControllerActionOrigin_XBoxOne_View, - k_EControllerActionOrigin_XBoxOne_LeftTrigger_Pull, - k_EControllerActionOrigin_XBoxOne_LeftTrigger_Click, - k_EControllerActionOrigin_XBoxOne_RightTrigger_Pull, - k_EControllerActionOrigin_XBoxOne_RightTrigger_Click, - k_EControllerActionOrigin_XBoxOne_LeftStick_Move, - k_EControllerActionOrigin_XBoxOne_LeftStick_Click, - k_EControllerActionOrigin_XBoxOne_LeftStick_DPadNorth, - k_EControllerActionOrigin_XBoxOne_LeftStick_DPadSouth, - k_EControllerActionOrigin_XBoxOne_LeftStick_DPadWest, - k_EControllerActionOrigin_XBoxOne_LeftStick_DPadEast, - k_EControllerActionOrigin_XBoxOne_RightStick_Move, - k_EControllerActionOrigin_XBoxOne_RightStick_Click, - k_EControllerActionOrigin_XBoxOne_RightStick_DPadNorth, - k_EControllerActionOrigin_XBoxOne_RightStick_DPadSouth, - k_EControllerActionOrigin_XBoxOne_RightStick_DPadWest, - k_EControllerActionOrigin_XBoxOne_RightStick_DPadEast, - k_EControllerActionOrigin_XBoxOne_DPad_North, - k_EControllerActionOrigin_XBoxOne_DPad_South, - k_EControllerActionOrigin_XBoxOne_DPad_West, - k_EControllerActionOrigin_XBoxOne_DPad_East, - k_EControllerActionOrigin_XBox360_A, - k_EControllerActionOrigin_XBox360_B, - k_EControllerActionOrigin_XBox360_X, - k_EControllerActionOrigin_XBox360_Y, - k_EControllerActionOrigin_XBox360_LeftBumper, - k_EControllerActionOrigin_XBox360_RightBumper, - k_EControllerActionOrigin_XBox360_Start, - k_EControllerActionOrigin_XBox360_Back, - k_EControllerActionOrigin_XBox360_LeftTrigger_Pull, - k_EControllerActionOrigin_XBox360_LeftTrigger_Click, - k_EControllerActionOrigin_XBox360_RightTrigger_Pull, - k_EControllerActionOrigin_XBox360_RightTrigger_Click, - k_EControllerActionOrigin_XBox360_LeftStick_Move, - k_EControllerActionOrigin_XBox360_LeftStick_Click, - k_EControllerActionOrigin_XBox360_LeftStick_DPadNorth, - k_EControllerActionOrigin_XBox360_LeftStick_DPadSouth, - k_EControllerActionOrigin_XBox360_LeftStick_DPadWest, - k_EControllerActionOrigin_XBox360_LeftStick_DPadEast, - k_EControllerActionOrigin_XBox360_RightStick_Move, - k_EControllerActionOrigin_XBox360_RightStick_Click, - k_EControllerActionOrigin_XBox360_RightStick_DPadNorth, - k_EControllerActionOrigin_XBox360_RightStick_DPadSouth, - k_EControllerActionOrigin_XBox360_RightStick_DPadWest, - k_EControllerActionOrigin_XBox360_RightStick_DPadEast, - k_EControllerActionOrigin_XBox360_DPad_North, - k_EControllerActionOrigin_XBox360_DPad_South, - k_EControllerActionOrigin_XBox360_DPad_West, - k_EControllerActionOrigin_XBox360_DPad_East, - k_EControllerActionOrigin_SteamV2_A, - k_EControllerActionOrigin_SteamV2_B, - k_EControllerActionOrigin_SteamV2_X, - k_EControllerActionOrigin_SteamV2_Y, - k_EControllerActionOrigin_SteamV2_LeftBumper, - k_EControllerActionOrigin_SteamV2_RightBumper, - k_EControllerActionOrigin_SteamV2_LeftGrip, - k_EControllerActionOrigin_SteamV2_RightGrip, - k_EControllerActionOrigin_SteamV2_Start, - k_EControllerActionOrigin_SteamV2_Back, - k_EControllerActionOrigin_SteamV2_LeftPad_Touch, - k_EControllerActionOrigin_SteamV2_LeftPad_Swipe, - k_EControllerActionOrigin_SteamV2_LeftPad_Click, - k_EControllerActionOrigin_SteamV2_LeftPad_DPadNorth, - k_EControllerActionOrigin_SteamV2_LeftPad_DPadSouth, - k_EControllerActionOrigin_SteamV2_LeftPad_DPadWest, - k_EControllerActionOrigin_SteamV2_LeftPad_DPadEast, - k_EControllerActionOrigin_SteamV2_RightPad_Touch, - k_EControllerActionOrigin_SteamV2_RightPad_Swipe, - k_EControllerActionOrigin_SteamV2_RightPad_Click, - k_EControllerActionOrigin_SteamV2_RightPad_DPadNorth, - k_EControllerActionOrigin_SteamV2_RightPad_DPadSouth, - k_EControllerActionOrigin_SteamV2_RightPad_DPadWest, - k_EControllerActionOrigin_SteamV2_RightPad_DPadEast, - k_EControllerActionOrigin_SteamV2_LeftTrigger_Pull, - k_EControllerActionOrigin_SteamV2_LeftTrigger_Click, - k_EControllerActionOrigin_SteamV2_RightTrigger_Pull, - k_EControllerActionOrigin_SteamV2_RightTrigger_Click, - k_EControllerActionOrigin_SteamV2_LeftStick_Move, - k_EControllerActionOrigin_SteamV2_LeftStick_Click, - k_EControllerActionOrigin_SteamV2_LeftStick_DPadNorth, - k_EControllerActionOrigin_SteamV2_LeftStick_DPadSouth, - k_EControllerActionOrigin_SteamV2_LeftStick_DPadWest, - k_EControllerActionOrigin_SteamV2_LeftStick_DPadEast, - k_EControllerActionOrigin_SteamV2_Gyro_Move, - k_EControllerActionOrigin_SteamV2_Gyro_Pitch, - k_EControllerActionOrigin_SteamV2_Gyro_Yaw, - k_EControllerActionOrigin_SteamV2_Gyro_Roll, - k_EControllerActionOrigin_Count, - } -} diff --git a/Src/SteamworksNET/EControllerSource.cs b/Src/SteamworksNET/EControllerSource.cs deleted file mode 100644 index 5dd4fd38..00000000 --- a/Src/SteamworksNET/EControllerSource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EControllerSource -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EControllerSource - { - k_EControllerSource_None, - k_EControllerSource_LeftTrackpad, - k_EControllerSource_RightTrackpad, - k_EControllerSource_Joystick, - k_EControllerSource_ABXY, - k_EControllerSource_Switch, - k_EControllerSource_LeftTrigger, - k_EControllerSource_RightTrigger, - k_EControllerSource_Gyro, - k_EControllerSource_CenterTrackpad, - k_EControllerSource_RightJoystick, - k_EControllerSource_DPad, - k_EControllerSource_Count, - } -} diff --git a/Src/SteamworksNET/EControllerSourceMode.cs b/Src/SteamworksNET/EControllerSourceMode.cs deleted file mode 100644 index dfcfcefe..00000000 --- a/Src/SteamworksNET/EControllerSourceMode.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EControllerSourceMode -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EControllerSourceMode - { - k_EControllerSourceMode_None, - k_EControllerSourceMode_Dpad, - k_EControllerSourceMode_Buttons, - k_EControllerSourceMode_FourButtons, - k_EControllerSourceMode_AbsoluteMouse, - k_EControllerSourceMode_RelativeMouse, - k_EControllerSourceMode_JoystickMove, - k_EControllerSourceMode_JoystickMouse, - k_EControllerSourceMode_JoystickCamera, - k_EControllerSourceMode_ScrollWheel, - k_EControllerSourceMode_Trigger, - k_EControllerSourceMode_TouchMenu, - k_EControllerSourceMode_MouseJoystick, - k_EControllerSourceMode_MouseRegion, - k_EControllerSourceMode_RadialMenu, - k_EControllerSourceMode_Switches, - } -} diff --git a/Src/SteamworksNET/EDenyReason.cs b/Src/SteamworksNET/EDenyReason.cs deleted file mode 100644 index 2459dfb6..00000000 --- a/Src/SteamworksNET/EDenyReason.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EDenyReason -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EDenyReason - { - k_EDenyInvalid, - k_EDenyInvalidVersion, - k_EDenyGeneric, - k_EDenyNotLoggedOn, - k_EDenyNoLicense, - k_EDenyCheater, - k_EDenyLoggedInElseWhere, - k_EDenyUnknownText, - k_EDenyIncompatibleAnticheat, - k_EDenyMemoryCorruption, - k_EDenyIncompatibleSoftware, - k_EDenySteamConnectionLost, - k_EDenySteamConnectionError, - k_EDenySteamResponseTimedOut, - k_EDenySteamValidationStalled, - k_EDenySteamOwnerLeftGuestUser, - } -} diff --git a/Src/SteamworksNET/EFailureType.cs b/Src/SteamworksNET/EFailureType.cs deleted file mode 100644 index 7500bad7..00000000 --- a/Src/SteamworksNET/EFailureType.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EFailureType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EFailureType - { - k_EFailureFlushedCallbackQueue, - k_EFailurePipeFail, - } -} diff --git a/Src/SteamworksNET/EFriendFlags.cs b/Src/SteamworksNET/EFriendFlags.cs deleted file mode 100644 index 4fbdaf67..00000000 --- a/Src/SteamworksNET/EFriendFlags.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EFriendFlags -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EFriendFlags - { - k_EFriendFlagNone = 0, - k_EFriendFlagBlocked = 1, - k_EFriendFlagFriendshipRequested = 2, - k_EFriendFlagImmediate = 4, - k_EFriendFlagClanMember = 8, - k_EFriendFlagOnGameServer = 16, // 0x00000010 - k_EFriendFlagRequestingFriendship = 128, // 0x00000080 - k_EFriendFlagRequestingInfo = 256, // 0x00000100 - k_EFriendFlagIgnored = 512, // 0x00000200 - k_EFriendFlagIgnoredFriend = 1024, // 0x00000400 - k_EFriendFlagChatMember = 4096, // 0x00001000 - k_EFriendFlagAll = 65535, // 0x0000FFFF - } -} diff --git a/Src/SteamworksNET/EFriendRelationship.cs b/Src/SteamworksNET/EFriendRelationship.cs deleted file mode 100644 index e1f09526..00000000 --- a/Src/SteamworksNET/EFriendRelationship.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EFriendRelationship -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EFriendRelationship - { - k_EFriendRelationshipNone, - k_EFriendRelationshipBlocked, - k_EFriendRelationshipRequestRecipient, - k_EFriendRelationshipFriend, - k_EFriendRelationshipRequestInitiator, - k_EFriendRelationshipIgnored, - k_EFriendRelationshipIgnoredFriend, - k_EFriendRelationshipSuggested_DEPRECATED, - k_EFriendRelationshipMax, - } -} diff --git a/Src/SteamworksNET/EGCResults.cs b/Src/SteamworksNET/EGCResults.cs deleted file mode 100644 index 78769538..00000000 --- a/Src/SteamworksNET/EGCResults.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EGCResults -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EGCResults - { - k_EGCResultOK, - k_EGCResultNoMessage, - k_EGCResultBufferTooSmall, - k_EGCResultNotLoggedOn, - k_EGCResultInvalidMessage, - } -} diff --git a/Src/SteamworksNET/EGamepadTextInputLineMode.cs b/Src/SteamworksNET/EGamepadTextInputLineMode.cs deleted file mode 100644 index 7310fece..00000000 --- a/Src/SteamworksNET/EGamepadTextInputLineMode.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EGamepadTextInputLineMode -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EGamepadTextInputLineMode - { - k_EGamepadTextInputLineModeSingleLine, - k_EGamepadTextInputLineModeMultipleLines, - } -} diff --git a/Src/SteamworksNET/EGamepadTextInputMode.cs b/Src/SteamworksNET/EGamepadTextInputMode.cs deleted file mode 100644 index af908743..00000000 --- a/Src/SteamworksNET/EGamepadTextInputMode.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EGamepadTextInputMode -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EGamepadTextInputMode - { - k_EGamepadTextInputModeNormal, - k_EGamepadTextInputModePassword, - } -} diff --git a/Src/SteamworksNET/EHTMLKeyModifiers.cs b/Src/SteamworksNET/EHTMLKeyModifiers.cs deleted file mode 100644 index 7919fe43..00000000 --- a/Src/SteamworksNET/EHTMLKeyModifiers.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EHTMLKeyModifiers -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EHTMLKeyModifiers - { - k_eHTMLKeyModifier_None = 0, - k_eHTMLKeyModifier_AltDown = 1, - k_eHTMLKeyModifier_CtrlDown = 2, - k_eHTMLKeyModifier_ShiftDown = 4, - } -} diff --git a/Src/SteamworksNET/EHTMLMouseButton.cs b/Src/SteamworksNET/EHTMLMouseButton.cs deleted file mode 100644 index 0c4e82a0..00000000 --- a/Src/SteamworksNET/EHTMLMouseButton.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EHTMLMouseButton -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EHTMLMouseButton - { - eHTMLMouseButton_Left, - eHTMLMouseButton_Right, - eHTMLMouseButton_Middle, - } -} diff --git a/Src/SteamworksNET/EHTTPMethod.cs b/Src/SteamworksNET/EHTTPMethod.cs deleted file mode 100644 index c1a94682..00000000 --- a/Src/SteamworksNET/EHTTPMethod.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EHTTPMethod -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EHTTPMethod - { - k_EHTTPMethodInvalid, - k_EHTTPMethodGET, - k_EHTTPMethodHEAD, - k_EHTTPMethodPOST, - k_EHTTPMethodPUT, - k_EHTTPMethodDELETE, - k_EHTTPMethodOPTIONS, - k_EHTTPMethodPATCH, - } -} diff --git a/Src/SteamworksNET/EHTTPStatusCode.cs b/Src/SteamworksNET/EHTTPStatusCode.cs deleted file mode 100644 index 30f17ecb..00000000 --- a/Src/SteamworksNET/EHTTPStatusCode.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EHTTPStatusCode -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EHTTPStatusCode - { - k_EHTTPStatusCodeInvalid = 0, - k_EHTTPStatusCode100Continue = 100, // 0x00000064 - k_EHTTPStatusCode101SwitchingProtocols = 101, // 0x00000065 - k_EHTTPStatusCode200OK = 200, // 0x000000C8 - k_EHTTPStatusCode201Created = 201, // 0x000000C9 - k_EHTTPStatusCode202Accepted = 202, // 0x000000CA - k_EHTTPStatusCode203NonAuthoritative = 203, // 0x000000CB - k_EHTTPStatusCode204NoContent = 204, // 0x000000CC - k_EHTTPStatusCode205ResetContent = 205, // 0x000000CD - k_EHTTPStatusCode206PartialContent = 206, // 0x000000CE - k_EHTTPStatusCode300MultipleChoices = 300, // 0x0000012C - k_EHTTPStatusCode301MovedPermanently = 301, // 0x0000012D - k_EHTTPStatusCode302Found = 302, // 0x0000012E - k_EHTTPStatusCode303SeeOther = 303, // 0x0000012F - k_EHTTPStatusCode304NotModified = 304, // 0x00000130 - k_EHTTPStatusCode305UseProxy = 305, // 0x00000131 - k_EHTTPStatusCode307TemporaryRedirect = 307, // 0x00000133 - k_EHTTPStatusCode400BadRequest = 400, // 0x00000190 - k_EHTTPStatusCode401Unauthorized = 401, // 0x00000191 - k_EHTTPStatusCode402PaymentRequired = 402, // 0x00000192 - k_EHTTPStatusCode403Forbidden = 403, // 0x00000193 - k_EHTTPStatusCode404NotFound = 404, // 0x00000194 - k_EHTTPStatusCode405MethodNotAllowed = 405, // 0x00000195 - k_EHTTPStatusCode406NotAcceptable = 406, // 0x00000196 - k_EHTTPStatusCode407ProxyAuthRequired = 407, // 0x00000197 - k_EHTTPStatusCode408RequestTimeout = 408, // 0x00000198 - k_EHTTPStatusCode409Conflict = 409, // 0x00000199 - k_EHTTPStatusCode410Gone = 410, // 0x0000019A - k_EHTTPStatusCode411LengthRequired = 411, // 0x0000019B - k_EHTTPStatusCode412PreconditionFailed = 412, // 0x0000019C - k_EHTTPStatusCode413RequestEntityTooLarge = 413, // 0x0000019D - k_EHTTPStatusCode414RequestURITooLong = 414, // 0x0000019E - k_EHTTPStatusCode415UnsupportedMediaType = 415, // 0x0000019F - k_EHTTPStatusCode416RequestedRangeNotSatisfiable = 416, // 0x000001A0 - k_EHTTPStatusCode417ExpectationFailed = 417, // 0x000001A1 - k_EHTTPStatusCode4xxUnknown = 418, // 0x000001A2 - k_EHTTPStatusCode429TooManyRequests = 429, // 0x000001AD - k_EHTTPStatusCode500InternalServerError = 500, // 0x000001F4 - k_EHTTPStatusCode501NotImplemented = 501, // 0x000001F5 - k_EHTTPStatusCode502BadGateway = 502, // 0x000001F6 - k_EHTTPStatusCode503ServiceUnavailable = 503, // 0x000001F7 - k_EHTTPStatusCode504GatewayTimeout = 504, // 0x000001F8 - k_EHTTPStatusCode505HTTPVersionNotSupported = 505, // 0x000001F9 - k_EHTTPStatusCode5xxUnknown = 599, // 0x00000257 - } -} diff --git a/Src/SteamworksNET/EItemPreviewType.cs b/Src/SteamworksNET/EItemPreviewType.cs deleted file mode 100644 index ed3f9263..00000000 --- a/Src/SteamworksNET/EItemPreviewType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EItemPreviewType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EItemPreviewType - { - k_EItemPreviewType_Image = 0, - k_EItemPreviewType_YouTubeVideo = 1, - k_EItemPreviewType_Sketchfab = 2, - k_EItemPreviewType_EnvironmentMap_HorizontalCross = 3, - k_EItemPreviewType_EnvironmentMap_LatLong = 4, - k_EItemPreviewType_ReservedMax = 255, // 0x000000FF - } -} diff --git a/Src/SteamworksNET/EItemState.cs b/Src/SteamworksNET/EItemState.cs deleted file mode 100644 index 9bbe1cba..00000000 --- a/Src/SteamworksNET/EItemState.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EItemState -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EItemState - { - k_EItemStateNone = 0, - k_EItemStateSubscribed = 1, - k_EItemStateLegacyItem = 2, - k_EItemStateInstalled = 4, - k_EItemStateNeedsUpdate = 8, - k_EItemStateDownloading = 16, // 0x00000010 - k_EItemStateDownloadPending = 32, // 0x00000020 - } -} diff --git a/Src/SteamworksNET/EItemStatistic.cs b/Src/SteamworksNET/EItemStatistic.cs deleted file mode 100644 index e6b93a26..00000000 --- a/Src/SteamworksNET/EItemStatistic.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EItemStatistic -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EItemStatistic - { - k_EItemStatistic_NumSubscriptions, - k_EItemStatistic_NumFavorites, - k_EItemStatistic_NumFollowers, - k_EItemStatistic_NumUniqueSubscriptions, - k_EItemStatistic_NumUniqueFavorites, - k_EItemStatistic_NumUniqueFollowers, - k_EItemStatistic_NumUniqueWebsiteViews, - k_EItemStatistic_ReportScore, - k_EItemStatistic_NumSecondsPlayed, - k_EItemStatistic_NumPlaytimeSessions, - k_EItemStatistic_NumComments, - } -} diff --git a/Src/SteamworksNET/EItemUpdateStatus.cs b/Src/SteamworksNET/EItemUpdateStatus.cs deleted file mode 100644 index f4e92d00..00000000 --- a/Src/SteamworksNET/EItemUpdateStatus.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EItemUpdateStatus -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EItemUpdateStatus - { - k_EItemUpdateStatusInvalid, - k_EItemUpdateStatusPreparingConfig, - k_EItemUpdateStatusPreparingContent, - k_EItemUpdateStatusUploadingContent, - k_EItemUpdateStatusUploadingPreviewFile, - k_EItemUpdateStatusCommittingChanges, - } -} diff --git a/Src/SteamworksNET/ELaunchOptionType.cs b/Src/SteamworksNET/ELaunchOptionType.cs deleted file mode 100644 index 5a3f52bc..00000000 --- a/Src/SteamworksNET/ELaunchOptionType.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELaunchOptionType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELaunchOptionType - { - k_ELaunchOptionType_None = 0, - k_ELaunchOptionType_Default = 1, - k_ELaunchOptionType_SafeMode = 2, - k_ELaunchOptionType_Multiplayer = 3, - k_ELaunchOptionType_Config = 4, - k_ELaunchOptionType_OpenVR = 5, - k_ELaunchOptionType_Server = 6, - k_ELaunchOptionType_Editor = 7, - k_ELaunchOptionType_Manual = 8, - k_ELaunchOptionType_Benchmark = 9, - k_ELaunchOptionType_Option1 = 10, // 0x0000000A - k_ELaunchOptionType_Option2 = 11, // 0x0000000B - k_ELaunchOptionType_Option3 = 12, // 0x0000000C - k_ELaunchOptionType_OculusVR = 13, // 0x0000000D - k_ELaunchOptionType_OpenVROverlay = 14, // 0x0000000E - k_ELaunchOptionType_OSVR = 15, // 0x0000000F - k_ELaunchOptionType_Dialog = 1000, // 0x000003E8 - } -} diff --git a/Src/SteamworksNET/ELeaderboardDataRequest.cs b/Src/SteamworksNET/ELeaderboardDataRequest.cs deleted file mode 100644 index a216fe50..00000000 --- a/Src/SteamworksNET/ELeaderboardDataRequest.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELeaderboardDataRequest -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELeaderboardDataRequest - { - k_ELeaderboardDataRequestGlobal, - k_ELeaderboardDataRequestGlobalAroundUser, - k_ELeaderboardDataRequestFriends, - k_ELeaderboardDataRequestUsers, - } -} diff --git a/Src/SteamworksNET/ELeaderboardDisplayType.cs b/Src/SteamworksNET/ELeaderboardDisplayType.cs deleted file mode 100644 index e3e2847a..00000000 --- a/Src/SteamworksNET/ELeaderboardDisplayType.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELeaderboardDisplayType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELeaderboardDisplayType - { - k_ELeaderboardDisplayTypeNone, - k_ELeaderboardDisplayTypeNumeric, - k_ELeaderboardDisplayTypeTimeSeconds, - k_ELeaderboardDisplayTypeTimeMilliSeconds, - } -} diff --git a/Src/SteamworksNET/ELeaderboardSortMethod.cs b/Src/SteamworksNET/ELeaderboardSortMethod.cs deleted file mode 100644 index cda133a4..00000000 --- a/Src/SteamworksNET/ELeaderboardSortMethod.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELeaderboardSortMethod -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELeaderboardSortMethod - { - k_ELeaderboardSortMethodNone, - k_ELeaderboardSortMethodAscending, - k_ELeaderboardSortMethodDescending, - } -} diff --git a/Src/SteamworksNET/ELeaderboardUploadScoreMethod.cs b/Src/SteamworksNET/ELeaderboardUploadScoreMethod.cs deleted file mode 100644 index 18f889d3..00000000 --- a/Src/SteamworksNET/ELeaderboardUploadScoreMethod.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELeaderboardUploadScoreMethod -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELeaderboardUploadScoreMethod - { - k_ELeaderboardUploadScoreMethodNone, - k_ELeaderboardUploadScoreMethodKeepBest, - k_ELeaderboardUploadScoreMethodForceUpdate, - } -} diff --git a/Src/SteamworksNET/ELobbyComparison.cs b/Src/SteamworksNET/ELobbyComparison.cs deleted file mode 100644 index 48f73277..00000000 --- a/Src/SteamworksNET/ELobbyComparison.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELobbyComparison -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELobbyComparison - { - k_ELobbyComparisonEqualToOrLessThan = -2, // 0xFFFFFFFE - k_ELobbyComparisonLessThan = -1, // 0xFFFFFFFF - k_ELobbyComparisonEqual = 0, - k_ELobbyComparisonGreaterThan = 1, - k_ELobbyComparisonEqualToOrGreaterThan = 2, - k_ELobbyComparisonNotEqual = 3, - } -} diff --git a/Src/SteamworksNET/ELobbyDistanceFilter.cs b/Src/SteamworksNET/ELobbyDistanceFilter.cs deleted file mode 100644 index db2af968..00000000 --- a/Src/SteamworksNET/ELobbyDistanceFilter.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELobbyDistanceFilter -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELobbyDistanceFilter - { - k_ELobbyDistanceFilterClose, - k_ELobbyDistanceFilterDefault, - k_ELobbyDistanceFilterFar, - k_ELobbyDistanceFilterWorldwide, - } -} diff --git a/Src/SteamworksNET/ELobbyType.cs b/Src/SteamworksNET/ELobbyType.cs deleted file mode 100644 index 396de37e..00000000 --- a/Src/SteamworksNET/ELobbyType.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ELobbyType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ELobbyType - { - k_ELobbyTypePrivate, - k_ELobbyTypeFriendsOnly, - k_ELobbyTypePublic, - k_ELobbyTypeInvisible, - } -} diff --git a/Src/SteamworksNET/EMarketingMessageFlags.cs b/Src/SteamworksNET/EMarketingMessageFlags.cs deleted file mode 100644 index b7a32718..00000000 --- a/Src/SteamworksNET/EMarketingMessageFlags.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EMarketingMessageFlags -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EMarketingMessageFlags - { - k_EMarketingMessageFlagsNone = 0, - k_EMarketingMessageFlagsHighPriority = 1, - k_EMarketingMessageFlagsPlatformWindows = 2, - k_EMarketingMessageFlagsPlatformMac = 4, - k_EMarketingMessageFlagsPlatformLinux = 8, - k_EMarketingMessageFlagsPlatformRestrictions = k_EMarketingMessageFlagsPlatformLinux | k_EMarketingMessageFlagsPlatformMac | k_EMarketingMessageFlagsPlatformWindows, // 0x0000000E - } -} diff --git a/Src/SteamworksNET/EMatchMakingServerResponse.cs b/Src/SteamworksNET/EMatchMakingServerResponse.cs deleted file mode 100644 index adf310db..00000000 --- a/Src/SteamworksNET/EMatchMakingServerResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EMatchMakingServerResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EMatchMakingServerResponse - { - eServerResponded, - eServerFailedToRespond, - eNoServersListedOnMasterServer, - } -} diff --git a/Src/SteamworksNET/EMouseCursor.cs b/Src/SteamworksNET/EMouseCursor.cs deleted file mode 100644 index 86a1d3cc..00000000 --- a/Src/SteamworksNET/EMouseCursor.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EMouseCursor -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EMouseCursor - { - dc_user, - dc_none, - dc_arrow, - dc_ibeam, - dc_hourglass, - dc_waitarrow, - dc_crosshair, - dc_up, - dc_sizenw, - dc_sizese, - dc_sizene, - dc_sizesw, - dc_sizew, - dc_sizee, - dc_sizen, - dc_sizes, - dc_sizewe, - dc_sizens, - dc_sizeall, - dc_no, - dc_hand, - dc_blank, - dc_middle_pan, - dc_north_pan, - dc_north_east_pan, - dc_east_pan, - dc_south_east_pan, - dc_south_pan, - dc_south_west_pan, - dc_west_pan, - dc_north_west_pan, - dc_alias, - dc_cell, - dc_colresize, - dc_copycur, - dc_verticaltext, - dc_rowresize, - dc_zoomin, - dc_zoomout, - dc_help, - dc_custom, - dc_last, - } -} diff --git a/Src/SteamworksNET/ENotificationPosition.cs b/Src/SteamworksNET/ENotificationPosition.cs deleted file mode 100644 index 776b47a7..00000000 --- a/Src/SteamworksNET/ENotificationPosition.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ENotificationPosition -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ENotificationPosition - { - k_EPositionTopLeft, - k_EPositionTopRight, - k_EPositionBottomLeft, - k_EPositionBottomRight, - } -} diff --git a/Src/SteamworksNET/EOverlayToStoreFlag.cs b/Src/SteamworksNET/EOverlayToStoreFlag.cs deleted file mode 100644 index 920dbc1c..00000000 --- a/Src/SteamworksNET/EOverlayToStoreFlag.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EOverlayToStoreFlag -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EOverlayToStoreFlag - { - k_EOverlayToStoreFlag_None, - k_EOverlayToStoreFlag_AddToCart, - k_EOverlayToStoreFlag_AddToCartAndShow, - } -} diff --git a/Src/SteamworksNET/EP2PSend.cs b/Src/SteamworksNET/EP2PSend.cs deleted file mode 100644 index 57f7b0c7..00000000 --- a/Src/SteamworksNET/EP2PSend.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EP2PSend -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EP2PSend - { - k_EP2PSendUnreliable, - k_EP2PSendUnreliableNoDelay, - k_EP2PSendReliable, - k_EP2PSendReliableWithBuffering, - } -} diff --git a/Src/SteamworksNET/EP2PSessionError.cs b/Src/SteamworksNET/EP2PSessionError.cs deleted file mode 100644 index 1fb7892e..00000000 --- a/Src/SteamworksNET/EP2PSessionError.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EP2PSessionError -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EP2PSessionError - { - k_EP2PSessionErrorNone, - k_EP2PSessionErrorNotRunningApp, - k_EP2PSessionErrorNoRightsToApp, - k_EP2PSessionErrorDestinationNotLoggedIn, - k_EP2PSessionErrorTimeout, - k_EP2PSessionErrorMax, - } -} diff --git a/Src/SteamworksNET/EPersonaChange.cs b/Src/SteamworksNET/EPersonaChange.cs deleted file mode 100644 index c51a3fc3..00000000 --- a/Src/SteamworksNET/EPersonaChange.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EPersonaChange -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum EPersonaChange - { - k_EPersonaChangeName = 1, - k_EPersonaChangeStatus = 2, - k_EPersonaChangeComeOnline = 4, - k_EPersonaChangeGoneOffline = 8, - k_EPersonaChangeGamePlayed = 16, // 0x00000010 - k_EPersonaChangeGameServer = 32, // 0x00000020 - k_EPersonaChangeAvatar = 64, // 0x00000040 - k_EPersonaChangeJoinedSource = 128, // 0x00000080 - k_EPersonaChangeLeftSource = 256, // 0x00000100 - k_EPersonaChangeRelationshipChanged = 512, // 0x00000200 - k_EPersonaChangeNameFirstSet = 1024, // 0x00000400 - k_EPersonaChangeFacebookInfo = 2048, // 0x00000800 - k_EPersonaChangeNickname = 4096, // 0x00001000 - k_EPersonaChangeSteamLevel = 8192, // 0x00002000 - } -} diff --git a/Src/SteamworksNET/EPersonaState.cs b/Src/SteamworksNET/EPersonaState.cs deleted file mode 100644 index aa729703..00000000 --- a/Src/SteamworksNET/EPersonaState.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EPersonaState -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EPersonaState - { - k_EPersonaStateOffline, - k_EPersonaStateOnline, - k_EPersonaStateBusy, - k_EPersonaStateAway, - k_EPersonaStateSnooze, - k_EPersonaStateLookingToTrade, - k_EPersonaStateLookingToPlay, - k_EPersonaStateMax, - } -} diff --git a/Src/SteamworksNET/ERegisterActivationCodeResult.cs b/Src/SteamworksNET/ERegisterActivationCodeResult.cs deleted file mode 100644 index 2617f44c..00000000 --- a/Src/SteamworksNET/ERegisterActivationCodeResult.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ERegisterActivationCodeResult -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ERegisterActivationCodeResult - { - k_ERegisterActivationCodeResultOK, - k_ERegisterActivationCodeResultFail, - k_ERegisterActivationCodeResultAlreadyRegistered, - k_ERegisterActivationCodeResultTimeout, - k_ERegisterActivationCodeAlreadyOwned, - } -} diff --git a/Src/SteamworksNET/ERemoteStoragePlatform.cs b/Src/SteamworksNET/ERemoteStoragePlatform.cs deleted file mode 100644 index 177834f0..00000000 --- a/Src/SteamworksNET/ERemoteStoragePlatform.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ERemoteStoragePlatform -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum ERemoteStoragePlatform - { - k_ERemoteStoragePlatformNone = 0, - k_ERemoteStoragePlatformWindows = 1, - k_ERemoteStoragePlatformOSX = 2, - k_ERemoteStoragePlatformPS3 = 4, - k_ERemoteStoragePlatformLinux = 8, - k_ERemoteStoragePlatformReserved2 = 16, // 0x00000010 - k_ERemoteStoragePlatformAll = -1, // 0xFFFFFFFF - } -} diff --git a/Src/SteamworksNET/ERemoteStoragePublishedFileVisibility.cs b/Src/SteamworksNET/ERemoteStoragePublishedFileVisibility.cs deleted file mode 100644 index 7617ff61..00000000 --- a/Src/SteamworksNET/ERemoteStoragePublishedFileVisibility.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ERemoteStoragePublishedFileVisibility -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ERemoteStoragePublishedFileVisibility - { - k_ERemoteStoragePublishedFileVisibilityPublic, - k_ERemoteStoragePublishedFileVisibilityFriendsOnly, - k_ERemoteStoragePublishedFileVisibilityPrivate, - } -} diff --git a/Src/SteamworksNET/EResult.cs b/Src/SteamworksNET/EResult.cs deleted file mode 100644 index d887b126..00000000 --- a/Src/SteamworksNET/EResult.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EResult -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EResult - { - k_EResultOK = 1, - k_EResultFail = 2, - k_EResultNoConnection = 3, - k_EResultInvalidPassword = 5, - k_EResultLoggedInElsewhere = 6, - k_EResultInvalidProtocolVer = 7, - k_EResultInvalidParam = 8, - k_EResultFileNotFound = 9, - k_EResultBusy = 10, // 0x0000000A - k_EResultInvalidState = 11, // 0x0000000B - k_EResultInvalidName = 12, // 0x0000000C - k_EResultInvalidEmail = 13, // 0x0000000D - k_EResultDuplicateName = 14, // 0x0000000E - k_EResultAccessDenied = 15, // 0x0000000F - k_EResultTimeout = 16, // 0x00000010 - k_EResultBanned = 17, // 0x00000011 - k_EResultAccountNotFound = 18, // 0x00000012 - k_EResultInvalidSteamID = 19, // 0x00000013 - k_EResultServiceUnavailable = 20, // 0x00000014 - k_EResultNotLoggedOn = 21, // 0x00000015 - k_EResultPending = 22, // 0x00000016 - k_EResultEncryptionFailure = 23, // 0x00000017 - k_EResultInsufficientPrivilege = 24, // 0x00000018 - k_EResultLimitExceeded = 25, // 0x00000019 - k_EResultRevoked = 26, // 0x0000001A - k_EResultExpired = 27, // 0x0000001B - k_EResultAlreadyRedeemed = 28, // 0x0000001C - k_EResultDuplicateRequest = 29, // 0x0000001D - k_EResultAlreadyOwned = 30, // 0x0000001E - k_EResultIPNotFound = 31, // 0x0000001F - k_EResultPersistFailed = 32, // 0x00000020 - k_EResultLockingFailed = 33, // 0x00000021 - k_EResultLogonSessionReplaced = 34, // 0x00000022 - k_EResultConnectFailed = 35, // 0x00000023 - k_EResultHandshakeFailed = 36, // 0x00000024 - k_EResultIOFailure = 37, // 0x00000025 - k_EResultRemoteDisconnect = 38, // 0x00000026 - k_EResultShoppingCartNotFound = 39, // 0x00000027 - k_EResultBlocked = 40, // 0x00000028 - k_EResultIgnored = 41, // 0x00000029 - k_EResultNoMatch = 42, // 0x0000002A - k_EResultAccountDisabled = 43, // 0x0000002B - k_EResultServiceReadOnly = 44, // 0x0000002C - k_EResultAccountNotFeatured = 45, // 0x0000002D - k_EResultAdministratorOK = 46, // 0x0000002E - k_EResultContentVersion = 47, // 0x0000002F - k_EResultTryAnotherCM = 48, // 0x00000030 - k_EResultPasswordRequiredToKickSession = 49, // 0x00000031 - k_EResultAlreadyLoggedInElsewhere = 50, // 0x00000032 - k_EResultSuspended = 51, // 0x00000033 - k_EResultCancelled = 52, // 0x00000034 - k_EResultDataCorruption = 53, // 0x00000035 - k_EResultDiskFull = 54, // 0x00000036 - k_EResultRemoteCallFailed = 55, // 0x00000037 - k_EResultPasswordUnset = 56, // 0x00000038 - k_EResultExternalAccountUnlinked = 57, // 0x00000039 - k_EResultPSNTicketInvalid = 58, // 0x0000003A - k_EResultExternalAccountAlreadyLinked = 59, // 0x0000003B - k_EResultRemoteFileConflict = 60, // 0x0000003C - k_EResultIllegalPassword = 61, // 0x0000003D - k_EResultSameAsPreviousValue = 62, // 0x0000003E - k_EResultAccountLogonDenied = 63, // 0x0000003F - k_EResultCannotUseOldPassword = 64, // 0x00000040 - k_EResultInvalidLoginAuthCode = 65, // 0x00000041 - k_EResultAccountLogonDeniedNoMail = 66, // 0x00000042 - k_EResultHardwareNotCapableOfIPT = 67, // 0x00000043 - k_EResultIPTInitError = 68, // 0x00000044 - k_EResultParentalControlRestricted = 69, // 0x00000045 - k_EResultFacebookQueryError = 70, // 0x00000046 - k_EResultExpiredLoginAuthCode = 71, // 0x00000047 - k_EResultIPLoginRestrictionFailed = 72, // 0x00000048 - k_EResultAccountLockedDown = 73, // 0x00000049 - k_EResultAccountLogonDeniedVerifiedEmailRequired = 74, // 0x0000004A - k_EResultNoMatchingURL = 75, // 0x0000004B - k_EResultBadResponse = 76, // 0x0000004C - k_EResultRequirePasswordReEntry = 77, // 0x0000004D - k_EResultValueOutOfRange = 78, // 0x0000004E - k_EResultUnexpectedError = 79, // 0x0000004F - k_EResultDisabled = 80, // 0x00000050 - k_EResultInvalidCEGSubmission = 81, // 0x00000051 - k_EResultRestrictedDevice = 82, // 0x00000052 - k_EResultRegionLocked = 83, // 0x00000053 - k_EResultRateLimitExceeded = 84, // 0x00000054 - k_EResultAccountLoginDeniedNeedTwoFactor = 85, // 0x00000055 - k_EResultItemDeleted = 86, // 0x00000056 - k_EResultAccountLoginDeniedThrottle = 87, // 0x00000057 - k_EResultTwoFactorCodeMismatch = 88, // 0x00000058 - k_EResultTwoFactorActivationCodeMismatch = 89, // 0x00000059 - k_EResultAccountAssociatedToMultiplePartners = 90, // 0x0000005A - k_EResultNotModified = 91, // 0x0000005B - k_EResultNoMobileDevice = 92, // 0x0000005C - k_EResultTimeNotSynced = 93, // 0x0000005D - k_EResultSmsCodeFailed = 94, // 0x0000005E - k_EResultAccountLimitExceeded = 95, // 0x0000005F - k_EResultAccountActivityLimitExceeded = 96, // 0x00000060 - k_EResultPhoneActivityLimitExceeded = 97, // 0x00000061 - k_EResultRefundToWallet = 98, // 0x00000062 - k_EResultEmailSendFailure = 99, // 0x00000063 - k_EResultNotSettled = 100, // 0x00000064 - k_EResultNeedCaptcha = 101, // 0x00000065 - k_EResultGSLTDenied = 102, // 0x00000066 - k_EResultGSOwnerDenied = 103, // 0x00000067 - k_EResultInvalidItemType = 104, // 0x00000068 - k_EResultIPBanned = 105, // 0x00000069 - k_EResultGSLTExpired = 106, // 0x0000006A - } -} diff --git a/Src/SteamworksNET/ESNetSocketConnectionType.cs b/Src/SteamworksNET/ESNetSocketConnectionType.cs deleted file mode 100644 index 14df9492..00000000 --- a/Src/SteamworksNET/ESNetSocketConnectionType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESNetSocketConnectionType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ESNetSocketConnectionType - { - k_ESNetSocketConnectionTypeNotConnected, - k_ESNetSocketConnectionTypeUDP, - k_ESNetSocketConnectionTypeUDPRelay, - } -} diff --git a/Src/SteamworksNET/ESNetSocketState.cs b/Src/SteamworksNET/ESNetSocketState.cs deleted file mode 100644 index 63ad9f8f..00000000 --- a/Src/SteamworksNET/ESNetSocketState.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESNetSocketState -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ESNetSocketState - { - k_ESNetSocketStateInvalid = 0, - k_ESNetSocketStateConnected = 1, - k_ESNetSocketStateInitiated = 10, // 0x0000000A - k_ESNetSocketStateLocalCandidatesFound = 11, // 0x0000000B - k_ESNetSocketStateReceivedRemoteCandidates = 12, // 0x0000000C - k_ESNetSocketStateChallengeHandshake = 15, // 0x0000000F - k_ESNetSocketStateDisconnecting = 21, // 0x00000015 - k_ESNetSocketStateLocalDisconnect = 22, // 0x00000016 - k_ESNetSocketStateTimeoutDuringConnect = 23, // 0x00000017 - k_ESNetSocketStateRemoteEndDisconnected = 24, // 0x00000018 - k_ESNetSocketStateConnectionBroken = 25, // 0x00000019 - } -} diff --git a/Src/SteamworksNET/EServerMode.cs b/Src/SteamworksNET/EServerMode.cs deleted file mode 100644 index 323ce314..00000000 --- a/Src/SteamworksNET/EServerMode.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EServerMode -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EServerMode - { - eServerModeInvalid, - eServerModeNoAuthentication, - eServerModeAuthentication, - eServerModeAuthenticationAndSecure, - } -} diff --git a/Src/SteamworksNET/ESteamAPICallFailure.cs b/Src/SteamworksNET/ESteamAPICallFailure.cs deleted file mode 100644 index 9a2bbea2..00000000 --- a/Src/SteamworksNET/ESteamAPICallFailure.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESteamAPICallFailure -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ESteamAPICallFailure - { - k_ESteamAPICallFailureNone = -1, // 0xFFFFFFFF - k_ESteamAPICallFailureSteamGone = 0, - k_ESteamAPICallFailureNetworkFailure = 1, - k_ESteamAPICallFailureInvalidHandle = 2, - k_ESteamAPICallFailureMismatchedCallback = 3, - } -} diff --git a/Src/SteamworksNET/ESteamControllerLEDFlag.cs b/Src/SteamworksNET/ESteamControllerLEDFlag.cs deleted file mode 100644 index 7ea595d4..00000000 --- a/Src/SteamworksNET/ESteamControllerLEDFlag.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESteamControllerLEDFlag -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ESteamControllerLEDFlag - { - k_ESteamControllerLEDFlag_SetColor, - k_ESteamControllerLEDFlag_RestoreUserDefault, - } -} diff --git a/Src/SteamworksNET/ESteamControllerPad.cs b/Src/SteamworksNET/ESteamControllerPad.cs deleted file mode 100644 index de15c902..00000000 --- a/Src/SteamworksNET/ESteamControllerPad.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESteamControllerPad -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ESteamControllerPad - { - k_ESteamControllerPad_Left, - k_ESteamControllerPad_Right, - } -} diff --git a/Src/SteamworksNET/ESteamItemFlags.cs b/Src/SteamworksNET/ESteamItemFlags.cs deleted file mode 100644 index b8395b08..00000000 --- a/Src/SteamworksNET/ESteamItemFlags.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESteamItemFlags -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Flags] - public enum ESteamItemFlags - { - k_ESteamItemNoTrade = 1, - k_ESteamItemRemoved = 256, // 0x00000100 - k_ESteamItemConsumed = 512, // 0x00000200 - } -} diff --git a/Src/SteamworksNET/ESteamUserStatType.cs b/Src/SteamworksNET/ESteamUserStatType.cs deleted file mode 100644 index 2ba3e1df..00000000 --- a/Src/SteamworksNET/ESteamUserStatType.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ESteamUserStatType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum ESteamUserStatType - { - k_ESteamUserStatTypeINVALID, - k_ESteamUserStatTypeINT, - k_ESteamUserStatTypeFLOAT, - k_ESteamUserStatTypeAVGRATE, - k_ESteamUserStatTypeACHIEVEMENTS, - k_ESteamUserStatTypeGROUPACHIEVEMENTS, - k_ESteamUserStatTypeMAX, - } -} diff --git a/Src/SteamworksNET/EUGCMatchingUGCType.cs b/Src/SteamworksNET/EUGCMatchingUGCType.cs deleted file mode 100644 index 2e9849bc..00000000 --- a/Src/SteamworksNET/EUGCMatchingUGCType.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUGCMatchingUGCType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUGCMatchingUGCType - { - k_EUGCMatchingUGCType_All = -1, // 0xFFFFFFFF - k_EUGCMatchingUGCType_Items = 0, - k_EUGCMatchingUGCType_Items_Mtx = 1, - k_EUGCMatchingUGCType_Items_ReadyToUse = 2, - k_EUGCMatchingUGCType_Collections = 3, - k_EUGCMatchingUGCType_Artwork = 4, - k_EUGCMatchingUGCType_Videos = 5, - k_EUGCMatchingUGCType_Screenshots = 6, - k_EUGCMatchingUGCType_AllGuides = 7, - k_EUGCMatchingUGCType_WebGuides = 8, - k_EUGCMatchingUGCType_IntegratedGuides = 9, - k_EUGCMatchingUGCType_UsableInGame = 10, // 0x0000000A - k_EUGCMatchingUGCType_ControllerBindings = 11, // 0x0000000B - k_EUGCMatchingUGCType_GameManagedItems = 12, // 0x0000000C - } -} diff --git a/Src/SteamworksNET/EUGCQuery.cs b/Src/SteamworksNET/EUGCQuery.cs deleted file mode 100644 index ad16eedb..00000000 --- a/Src/SteamworksNET/EUGCQuery.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUGCQuery -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUGCQuery - { - k_EUGCQuery_RankedByVote, - k_EUGCQuery_RankedByPublicationDate, - k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate, - k_EUGCQuery_RankedByTrend, - k_EUGCQuery_FavoritedByFriendsRankedByPublicationDate, - k_EUGCQuery_CreatedByFriendsRankedByPublicationDate, - k_EUGCQuery_RankedByNumTimesReported, - k_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate, - k_EUGCQuery_NotYetRated, - k_EUGCQuery_RankedByTotalVotesAsc, - k_EUGCQuery_RankedByVotesUp, - k_EUGCQuery_RankedByTextSearch, - k_EUGCQuery_RankedByTotalUniqueSubscriptions, - k_EUGCQuery_RankedByPlaytimeTrend, - k_EUGCQuery_RankedByTotalPlaytime, - k_EUGCQuery_RankedByAveragePlaytimeTrend, - k_EUGCQuery_RankedByLifetimeAveragePlaytime, - k_EUGCQuery_RankedByPlaytimeSessionsTrend, - k_EUGCQuery_RankedByLifetimePlaytimeSessions, - } -} diff --git a/Src/SteamworksNET/EUGCReadAction.cs b/Src/SteamworksNET/EUGCReadAction.cs deleted file mode 100644 index 5d63d60b..00000000 --- a/Src/SteamworksNET/EUGCReadAction.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUGCReadAction -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUGCReadAction - { - k_EUGCRead_ContinueReadingUntilFinished, - k_EUGCRead_ContinueReading, - k_EUGCRead_Close, - } -} diff --git a/Src/SteamworksNET/EUniverse.cs b/Src/SteamworksNET/EUniverse.cs deleted file mode 100644 index b91b2193..00000000 --- a/Src/SteamworksNET/EUniverse.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUniverse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUniverse - { - k_EUniverseInvalid, - k_EUniversePublic, - k_EUniverseBeta, - k_EUniverseInternal, - k_EUniverseDev, - k_EUniverseMax, - } -} diff --git a/Src/SteamworksNET/EUserHasLicenseForAppResult.cs b/Src/SteamworksNET/EUserHasLicenseForAppResult.cs deleted file mode 100644 index 62a3da19..00000000 --- a/Src/SteamworksNET/EUserHasLicenseForAppResult.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUserHasLicenseForAppResult -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUserHasLicenseForAppResult - { - k_EUserHasLicenseResultHasLicense, - k_EUserHasLicenseResultDoesNotHaveLicense, - k_EUserHasLicenseResultNoAuth, - } -} diff --git a/Src/SteamworksNET/EUserRestriction.cs b/Src/SteamworksNET/EUserRestriction.cs deleted file mode 100644 index 21d8a637..00000000 --- a/Src/SteamworksNET/EUserRestriction.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUserRestriction -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUserRestriction - { - k_nUserRestrictionNone = 0, - k_nUserRestrictionUnknown = 1, - k_nUserRestrictionAnyChat = 2, - k_nUserRestrictionVoiceChat = 4, - k_nUserRestrictionGroupChat = 8, - k_nUserRestrictionRating = 16, // 0x00000010 - k_nUserRestrictionGameInvites = 32, // 0x00000020 - k_nUserRestrictionTrading = 64, // 0x00000040 - } -} diff --git a/Src/SteamworksNET/EUserUGCList.cs b/Src/SteamworksNET/EUserUGCList.cs deleted file mode 100644 index 08a73765..00000000 --- a/Src/SteamworksNET/EUserUGCList.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUserUGCList -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUserUGCList - { - k_EUserUGCList_Published, - k_EUserUGCList_VotedOn, - k_EUserUGCList_VotedUp, - k_EUserUGCList_VotedDown, - k_EUserUGCList_WillVoteLater, - k_EUserUGCList_Favorited, - k_EUserUGCList_Subscribed, - k_EUserUGCList_UsedOrPlayed, - k_EUserUGCList_Followed, - } -} diff --git a/Src/SteamworksNET/EUserUGCListSortOrder.cs b/Src/SteamworksNET/EUserUGCListSortOrder.cs deleted file mode 100644 index f160d9de..00000000 --- a/Src/SteamworksNET/EUserUGCListSortOrder.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EUserUGCListSortOrder -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EUserUGCListSortOrder - { - k_EUserUGCListSortOrder_CreationOrderDesc, - k_EUserUGCListSortOrder_CreationOrderAsc, - k_EUserUGCListSortOrder_TitleAsc, - k_EUserUGCListSortOrder_LastUpdatedDesc, - k_EUserUGCListSortOrder_SubscriptionDateDesc, - k_EUserUGCListSortOrder_VoteScoreDesc, - k_EUserUGCListSortOrder_ForModeration, - } -} diff --git a/Src/SteamworksNET/EVRHMDType.cs b/Src/SteamworksNET/EVRHMDType.cs deleted file mode 100644 index 5e627cd6..00000000 --- a/Src/SteamworksNET/EVRHMDType.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EVRHMDType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EVRHMDType - { - k_eEVRHMDType_None = -1, // 0xFFFFFFFF - k_eEVRHMDType_Unknown = 0, - k_eEVRHMDType_HTC_Dev = 1, - k_eEVRHMDType_HTC_VivePre = 2, - k_eEVRHMDType_HTC_Vive = 3, - k_eEVRHMDType_HTC_Unknown = 20, // 0x00000014 - k_eEVRHMDType_Oculus_DK1 = 21, // 0x00000015 - k_eEVRHMDType_Oculus_DK2 = 22, // 0x00000016 - k_eEVRHMDType_Oculus_Rift = 23, // 0x00000017 - k_eEVRHMDType_Oculus_Unknown = 40, // 0x00000028 - } -} diff --git a/Src/SteamworksNET/EVRScreenshotType.cs b/Src/SteamworksNET/EVRScreenshotType.cs deleted file mode 100644 index 10a03426..00000000 --- a/Src/SteamworksNET/EVRScreenshotType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EVRScreenshotType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EVRScreenshotType - { - k_EVRScreenshotType_None, - k_EVRScreenshotType_Mono, - k_EVRScreenshotType_Stereo, - k_EVRScreenshotType_MonoCubemap, - k_EVRScreenshotType_MonoPanorama, - k_EVRScreenshotType_StereoPanorama, - } -} diff --git a/Src/SteamworksNET/EVoiceResult.cs b/Src/SteamworksNET/EVoiceResult.cs deleted file mode 100644 index f491b316..00000000 --- a/Src/SteamworksNET/EVoiceResult.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EVoiceResult -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EVoiceResult - { - k_EVoiceResultOK, - k_EVoiceResultNotInitialized, - k_EVoiceResultNotRecording, - k_EVoiceResultNoData, - k_EVoiceResultBufferTooSmall, - k_EVoiceResultDataCorrupted, - k_EVoiceResultRestricted, - k_EVoiceResultUnsupportedCodec, - k_EVoiceResultReceiverOutOfDate, - k_EVoiceResultReceiverDidNotAnswer, - } -} diff --git a/Src/SteamworksNET/EWorkshopEnumerationType.cs b/Src/SteamworksNET/EWorkshopEnumerationType.cs deleted file mode 100644 index 2c0eeca1..00000000 --- a/Src/SteamworksNET/EWorkshopEnumerationType.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EWorkshopEnumerationType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EWorkshopEnumerationType - { - k_EWorkshopEnumerationTypeRankedByVote, - k_EWorkshopEnumerationTypeRecent, - k_EWorkshopEnumerationTypeTrending, - k_EWorkshopEnumerationTypeFavoritesOfFriends, - k_EWorkshopEnumerationTypeVotedByFriends, - k_EWorkshopEnumerationTypeContentByFriends, - k_EWorkshopEnumerationTypeRecentFromFollowedUsers, - } -} diff --git a/Src/SteamworksNET/EWorkshopFileAction.cs b/Src/SteamworksNET/EWorkshopFileAction.cs deleted file mode 100644 index a0313ad0..00000000 --- a/Src/SteamworksNET/EWorkshopFileAction.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EWorkshopFileAction -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EWorkshopFileAction - { - k_EWorkshopFileActionPlayed, - k_EWorkshopFileActionCompleted, - } -} diff --git a/Src/SteamworksNET/EWorkshopFileType.cs b/Src/SteamworksNET/EWorkshopFileType.cs deleted file mode 100644 index a2ecff42..00000000 --- a/Src/SteamworksNET/EWorkshopFileType.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EWorkshopFileType -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EWorkshopFileType - { - k_EWorkshopFileTypeCommunity = 0, - k_EWorkshopFileTypeFirst = 0, - k_EWorkshopFileTypeMicrotransaction = 1, - k_EWorkshopFileTypeCollection = 2, - k_EWorkshopFileTypeArt = 3, - k_EWorkshopFileTypeVideo = 4, - k_EWorkshopFileTypeScreenshot = 5, - k_EWorkshopFileTypeGame = 6, - k_EWorkshopFileTypeSoftware = 7, - k_EWorkshopFileTypeConcept = 8, - k_EWorkshopFileTypeWebGuide = 9, - k_EWorkshopFileTypeIntegratedGuide = 10, // 0x0000000A - k_EWorkshopFileTypeMerch = 11, // 0x0000000B - k_EWorkshopFileTypeControllerBinding = 12, // 0x0000000C - k_EWorkshopFileTypeSteamworksAccessInvite = 13, // 0x0000000D - k_EWorkshopFileTypeSteamVideo = 14, // 0x0000000E - k_EWorkshopFileTypeGameManagedItem = 15, // 0x0000000F - k_EWorkshopFileTypeMax = 16, // 0x00000010 - } -} diff --git a/Src/SteamworksNET/EWorkshopVideoProvider.cs b/Src/SteamworksNET/EWorkshopVideoProvider.cs deleted file mode 100644 index d37defb2..00000000 --- a/Src/SteamworksNET/EWorkshopVideoProvider.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EWorkshopVideoProvider -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EWorkshopVideoProvider - { - k_EWorkshopVideoProviderNone, - k_EWorkshopVideoProviderYoutube, - } -} diff --git a/Src/SteamworksNET/EWorkshopVote.cs b/Src/SteamworksNET/EWorkshopVote.cs deleted file mode 100644 index 3e4fabf1..00000000 --- a/Src/SteamworksNET/EWorkshopVote.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EWorkshopVote -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public enum EWorkshopVote - { - k_EWorkshopVoteUnvoted, - k_EWorkshopVoteFor, - k_EWorkshopVoteAgainst, - k_EWorkshopVoteLater, - } -} diff --git a/Src/SteamworksNET/EncryptedAppTicketResponse_t.cs b/Src/SteamworksNET/EncryptedAppTicketResponse_t.cs deleted file mode 100644 index 9b4d7ba9..00000000 --- a/Src/SteamworksNET/EncryptedAppTicketResponse_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.EncryptedAppTicketResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(154)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct EncryptedAppTicketResponse_t - { - public const int k_iCallback = 154; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/FavoritesListAccountsUpdated_t.cs b/Src/SteamworksNET/FavoritesListAccountsUpdated_t.cs deleted file mode 100644 index 776d8010..00000000 --- a/Src/SteamworksNET/FavoritesListAccountsUpdated_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FavoritesListAccountsUpdated_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(516)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct FavoritesListAccountsUpdated_t - { - public const int k_iCallback = 516; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/FavoritesListChanged_t.cs b/Src/SteamworksNET/FavoritesListChanged_t.cs deleted file mode 100644 index 9a221997..00000000 --- a/Src/SteamworksNET/FavoritesListChanged_t.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FavoritesListChanged_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(502)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct FavoritesListChanged_t - { - public const int k_iCallback = 502; - public uint m_nIP; - public uint m_nQueryPort; - public uint m_nConnPort; - public uint m_nAppID; - public uint m_nFlags; - [MarshalAs(UnmanagedType.I1)] - public bool m_bAdd; - public AccountID_t m_unAccountId; - } -} diff --git a/Src/SteamworksNET/FileDetailsResult_t.cs b/Src/SteamworksNET/FileDetailsResult_t.cs deleted file mode 100644 index 895beafc..00000000 --- a/Src/SteamworksNET/FileDetailsResult_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FileDetailsResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1023)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct FileDetailsResult_t - { - public const int k_iCallback = 1023; - public EResult m_eResult; - public ulong m_ulFileSize; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] - public byte[] m_FileSHA; - public uint m_unFlags; - } -} diff --git a/Src/SteamworksNET/FriendGameInfo_t.cs b/Src/SteamworksNET/FriendGameInfo_t.cs deleted file mode 100644 index 8ca312b3..00000000 --- a/Src/SteamworksNET/FriendGameInfo_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendGameInfo_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct FriendGameInfo_t - { - public CGameID m_gameID; - public uint m_unGameIP; - public ushort m_usGamePort; - public ushort m_usQueryPort; - public CSteamID m_steamIDLobby; - } -} diff --git a/Src/SteamworksNET/FriendRichPresenceUpdate_t.cs b/Src/SteamworksNET/FriendRichPresenceUpdate_t.cs deleted file mode 100644 index 4c4fda92..00000000 --- a/Src/SteamworksNET/FriendRichPresenceUpdate_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendRichPresenceUpdate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(336)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct FriendRichPresenceUpdate_t - { - public const int k_iCallback = 336; - public CSteamID m_steamIDFriend; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/FriendSessionStateInfo_t.cs b/Src/SteamworksNET/FriendSessionStateInfo_t.cs deleted file mode 100644 index 7bb9c401..00000000 --- a/Src/SteamworksNET/FriendSessionStateInfo_t.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendSessionStateInfo_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public struct FriendSessionStateInfo_t - { - public uint m_uiOnlineSessionInstances; - public byte m_uiPublishedToFriendsSessionInstance; - } -} diff --git a/Src/SteamworksNET/FriendsEnumerateFollowingList_t.cs b/Src/SteamworksNET/FriendsEnumerateFollowingList_t.cs deleted file mode 100644 index 8b485fce..00000000 --- a/Src/SteamworksNET/FriendsEnumerateFollowingList_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendsEnumerateFollowingList_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(346)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct FriendsEnumerateFollowingList_t - { - public const int k_iCallback = 346; - public EResult m_eResult; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public CSteamID[] m_rgSteamID; - public int m_nResultsReturned; - public int m_nTotalResultCount; - } -} diff --git a/Src/SteamworksNET/FriendsGetFollowerCount_t.cs b/Src/SteamworksNET/FriendsGetFollowerCount_t.cs deleted file mode 100644 index 365acda4..00000000 --- a/Src/SteamworksNET/FriendsGetFollowerCount_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendsGetFollowerCount_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(344)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct FriendsGetFollowerCount_t - { - public const int k_iCallback = 344; - public EResult m_eResult; - public CSteamID m_steamID; - public int m_nCount; - } -} diff --git a/Src/SteamworksNET/FriendsGroupID_t.cs b/Src/SteamworksNET/FriendsGroupID_t.cs deleted file mode 100644 index ee976d28..00000000 --- a/Src/SteamworksNET/FriendsGroupID_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendsGroupID_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct FriendsGroupID_t : IEquatable, IComparable - { - public static readonly FriendsGroupID_t Invalid = new FriendsGroupID_t((short) -1); - public short m_FriendsGroupID; - - public FriendsGroupID_t(short value) => this.m_FriendsGroupID = value; - - public override string ToString() => this.m_FriendsGroupID.ToString(); - - public override bool Equals(object other) => other is FriendsGroupID_t friendsGroupIdT && this == friendsGroupIdT; - - public override int GetHashCode() => this.m_FriendsGroupID.GetHashCode(); - - public static bool operator ==(FriendsGroupID_t x, FriendsGroupID_t y) => (int) x.m_FriendsGroupID == (int) y.m_FriendsGroupID; - - public static bool operator !=(FriendsGroupID_t x, FriendsGroupID_t y) => !(x == y); - - public static explicit operator FriendsGroupID_t(short value) => new FriendsGroupID_t(value); - - public static explicit operator short(FriendsGroupID_t that) => that.m_FriendsGroupID; - - public bool Equals(FriendsGroupID_t other) => (int) this.m_FriendsGroupID == (int) other.m_FriendsGroupID; - - public int CompareTo(FriendsGroupID_t other) => this.m_FriendsGroupID.CompareTo(other.m_FriendsGroupID); - } -} diff --git a/Src/SteamworksNET/FriendsIsFollowing_t.cs b/Src/SteamworksNET/FriendsIsFollowing_t.cs deleted file mode 100644 index 0fefc2cf..00000000 --- a/Src/SteamworksNET/FriendsIsFollowing_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.FriendsIsFollowing_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(345)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct FriendsIsFollowing_t - { - public const int k_iCallback = 345; - public EResult m_eResult; - public CSteamID m_steamID; - [MarshalAs(UnmanagedType.I1)] - public bool m_bIsFollowing; - } -} diff --git a/Src/SteamworksNET/GCMessageAvailable_t.cs b/Src/SteamworksNET/GCMessageAvailable_t.cs deleted file mode 100644 index a1bd2e12..00000000 --- a/Src/SteamworksNET/GCMessageAvailable_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GCMessageAvailable_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1701)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GCMessageAvailable_t - { - public const int k_iCallback = 1701; - public uint m_nMessageSize; - } -} diff --git a/Src/SteamworksNET/GCMessageFailed_t.cs b/Src/SteamworksNET/GCMessageFailed_t.cs deleted file mode 100644 index 800c129b..00000000 --- a/Src/SteamworksNET/GCMessageFailed_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GCMessageFailed_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1702)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct GCMessageFailed_t - { - public const int k_iCallback = 1702; - } -} diff --git a/Src/SteamworksNET/GSClientAchievementStatus_t.cs b/Src/SteamworksNET/GSClientAchievementStatus_t.cs deleted file mode 100644 index 8e40a895..00000000 --- a/Src/SteamworksNET/GSClientAchievementStatus_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSClientAchievementStatus_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(206)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GSClientAchievementStatus_t - { - public const int k_iCallback = 206; - public ulong m_SteamID; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] - public string m_pchAchievement; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUnlocked; - } -} diff --git a/Src/SteamworksNET/GSClientApprove_t.cs b/Src/SteamworksNET/GSClientApprove_t.cs deleted file mode 100644 index 455f665e..00000000 --- a/Src/SteamworksNET/GSClientApprove_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSClientApprove_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(201)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GSClientApprove_t - { - public const int k_iCallback = 201; - public CSteamID m_SteamID; - public CSteamID m_OwnerSteamID; - } -} diff --git a/Src/SteamworksNET/GSClientDeny_t.cs b/Src/SteamworksNET/GSClientDeny_t.cs deleted file mode 100644 index f0828608..00000000 --- a/Src/SteamworksNET/GSClientDeny_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSClientDeny_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(202)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct GSClientDeny_t - { - public const int k_iCallback = 202; - public CSteamID m_SteamID; - public EDenyReason m_eDenyReason; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] - public string m_rgchOptionalText; - } -} diff --git a/Src/SteamworksNET/GSClientGroupStatus_t.cs b/Src/SteamworksNET/GSClientGroupStatus_t.cs deleted file mode 100644 index 5ab0b6d4..00000000 --- a/Src/SteamworksNET/GSClientGroupStatus_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSClientGroupStatus_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(208)] - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct GSClientGroupStatus_t - { - public const int k_iCallback = 208; - public CSteamID m_SteamIDUser; - public CSteamID m_SteamIDGroup; - [MarshalAs(UnmanagedType.I1)] - public bool m_bMember; - [MarshalAs(UnmanagedType.I1)] - public bool m_bOfficer; - } -} diff --git a/Src/SteamworksNET/GSClientKick_t.cs b/Src/SteamworksNET/GSClientKick_t.cs deleted file mode 100644 index ab46b2f9..00000000 --- a/Src/SteamworksNET/GSClientKick_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSClientKick_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(203)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct GSClientKick_t - { - public const int k_iCallback = 203; - public CSteamID m_SteamID; - public EDenyReason m_eDenyReason; - } -} diff --git a/Src/SteamworksNET/GSGameplayStats_t.cs b/Src/SteamworksNET/GSGameplayStats_t.cs deleted file mode 100644 index 8cbf8aa7..00000000 --- a/Src/SteamworksNET/GSGameplayStats_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSGameplayStats_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(207)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GSGameplayStats_t - { - public const int k_iCallback = 207; - public EResult m_eResult; - public int m_nRank; - public uint m_unTotalConnects; - public uint m_unTotalMinutesPlayed; - } -} diff --git a/Src/SteamworksNET/GSPolicyResponse_t.cs b/Src/SteamworksNET/GSPolicyResponse_t.cs deleted file mode 100644 index 329e1b95..00000000 --- a/Src/SteamworksNET/GSPolicyResponse_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSPolicyResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(115)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GSPolicyResponse_t - { - public const int k_iCallback = 115; - public byte m_bSecure; - } -} diff --git a/Src/SteamworksNET/GSReputation_t.cs b/Src/SteamworksNET/GSReputation_t.cs deleted file mode 100644 index f2eed856..00000000 --- a/Src/SteamworksNET/GSReputation_t.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSReputation_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(209)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GSReputation_t - { - public const int k_iCallback = 209; - public EResult m_eResult; - public uint m_unReputationScore; - [MarshalAs(UnmanagedType.I1)] - public bool m_bBanned; - public uint m_unBannedIP; - public ushort m_usBannedPort; - public ulong m_ulBannedGameID; - public uint m_unBanExpires; - } -} diff --git a/Src/SteamworksNET/GSStatsReceived_t.cs b/Src/SteamworksNET/GSStatsReceived_t.cs deleted file mode 100644 index 800397af..00000000 --- a/Src/SteamworksNET/GSStatsReceived_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSStatsReceived_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1800)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct GSStatsReceived_t - { - public const int k_iCallback = 1800; - public EResult m_eResult; - public CSteamID m_steamIDUser; - } -} diff --git a/Src/SteamworksNET/GSStatsStored_t.cs b/Src/SteamworksNET/GSStatsStored_t.cs deleted file mode 100644 index 83f57fde..00000000 --- a/Src/SteamworksNET/GSStatsStored_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSStatsStored_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1801)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct GSStatsStored_t - { - public const int k_iCallback = 1801; - public EResult m_eResult; - public CSteamID m_steamIDUser; - } -} diff --git a/Src/SteamworksNET/GSStatsUnloaded_t.cs b/Src/SteamworksNET/GSStatsUnloaded_t.cs deleted file mode 100644 index aa909e44..00000000 --- a/Src/SteamworksNET/GSStatsUnloaded_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GSStatsUnloaded_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1108)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GSStatsUnloaded_t - { - public const int k_iCallback = 1108; - public CSteamID m_steamIDUser; - } -} diff --git a/Src/SteamworksNET/GameConnectedChatJoin_t.cs b/Src/SteamworksNET/GameConnectedChatJoin_t.cs deleted file mode 100644 index d0c5454b..00000000 --- a/Src/SteamworksNET/GameConnectedChatJoin_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameConnectedChatJoin_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(339)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GameConnectedChatJoin_t - { - public const int k_iCallback = 339; - public CSteamID m_steamIDClanChat; - public CSteamID m_steamIDUser; - } -} diff --git a/Src/SteamworksNET/GameConnectedChatLeave_t.cs b/Src/SteamworksNET/GameConnectedChatLeave_t.cs deleted file mode 100644 index 73e003b8..00000000 --- a/Src/SteamworksNET/GameConnectedChatLeave_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameConnectedChatLeave_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(340)] - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct GameConnectedChatLeave_t - { - public const int k_iCallback = 340; - public CSteamID m_steamIDClanChat; - public CSteamID m_steamIDUser; - [MarshalAs(UnmanagedType.I1)] - public bool m_bKicked; - [MarshalAs(UnmanagedType.I1)] - public bool m_bDropped; - } -} diff --git a/Src/SteamworksNET/GameConnectedClanChatMsg_t.cs b/Src/SteamworksNET/GameConnectedClanChatMsg_t.cs deleted file mode 100644 index 3e2dcf0a..00000000 --- a/Src/SteamworksNET/GameConnectedClanChatMsg_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameConnectedClanChatMsg_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(338)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct GameConnectedClanChatMsg_t - { - public const int k_iCallback = 338; - public CSteamID m_steamIDClanChat; - public CSteamID m_steamIDUser; - public int m_iMessageID; - } -} diff --git a/Src/SteamworksNET/GameConnectedFriendChatMsg_t.cs b/Src/SteamworksNET/GameConnectedFriendChatMsg_t.cs deleted file mode 100644 index df1fa455..00000000 --- a/Src/SteamworksNET/GameConnectedFriendChatMsg_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameConnectedFriendChatMsg_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(343)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct GameConnectedFriendChatMsg_t - { - public const int k_iCallback = 343; - public CSteamID m_steamIDUser; - public int m_iMessageID; - } -} diff --git a/Src/SteamworksNET/GameLobbyJoinRequested_t.cs b/Src/SteamworksNET/GameLobbyJoinRequested_t.cs deleted file mode 100644 index 6a7e8df9..00000000 --- a/Src/SteamworksNET/GameLobbyJoinRequested_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameLobbyJoinRequested_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(333)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GameLobbyJoinRequested_t - { - public const int k_iCallback = 333; - public CSteamID m_steamIDLobby; - public CSteamID m_steamIDFriend; - } -} diff --git a/Src/SteamworksNET/GameOverlayActivated_t.cs b/Src/SteamworksNET/GameOverlayActivated_t.cs deleted file mode 100644 index 104362bd..00000000 --- a/Src/SteamworksNET/GameOverlayActivated_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameOverlayActivated_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(331)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GameOverlayActivated_t - { - public const int k_iCallback = 331; - public byte m_bActive; - } -} diff --git a/Src/SteamworksNET/GameRichPresenceJoinRequested_t.cs b/Src/SteamworksNET/GameRichPresenceJoinRequested_t.cs deleted file mode 100644 index f1c55d16..00000000 --- a/Src/SteamworksNET/GameRichPresenceJoinRequested_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameRichPresenceJoinRequested_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(337)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GameRichPresenceJoinRequested_t - { - public const int k_iCallback = 337; - public CSteamID m_steamIDFriend; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_rgchConnect; - } -} diff --git a/Src/SteamworksNET/GameServer.cs b/Src/SteamworksNET/GameServer.cs deleted file mode 100644 index 8f2e3f5c..00000000 --- a/Src/SteamworksNET/GameServer.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameServer -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class GameServer - { - public static bool Init( - uint unIP, - ushort usSteamPort, - ushort usGamePort, - ushort usQueryPort, - EServerMode eServerMode, - string pchVersionString) - { - InteropHelp.TestIfPlatformSupported(); - using (InteropHelp.UTF8StringHandle pchVersionString1 = new InteropHelp.UTF8StringHandle(pchVersionString)) - return NativeMethods.SteamGameServer_Init(unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString1); - } - - public static void Shutdown() - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamGameServer_Shutdown(); - } - - public static void RunCallbacks() - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamGameServer_RunCallbacks(); - } - - public static void ReleaseCurrentThreadMemory() - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamGameServer_ReleaseCurrentThreadMemory(); - } - - public static bool BSecure() - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamGameServer_BSecure(); - } - - public static CSteamID GetSteamID() - { - InteropHelp.TestIfPlatformSupported(); - return (CSteamID) NativeMethods.SteamGameServer_GetSteamID(); - } - - public static HSteamPipe GetHSteamPipe() - { - InteropHelp.TestIfPlatformSupported(); - return (HSteamPipe) NativeMethods.SteamGameServer_GetHSteamPipe(); - } - - public static HSteamUser GetHSteamUser() - { - InteropHelp.TestIfPlatformSupported(); - return (HSteamUser) NativeMethods.SteamGameServer_GetHSteamUser(); - } - } -} diff --git a/Src/SteamworksNET/GameServerChangeRequested_t.cs b/Src/SteamworksNET/GameServerChangeRequested_t.cs deleted file mode 100644 index fd20c2c5..00000000 --- a/Src/SteamworksNET/GameServerChangeRequested_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameServerChangeRequested_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(332)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GameServerChangeRequested_t - { - public const int k_iCallback = 332; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] - public string m_rgchServer; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] - public string m_rgchPassword; - } -} diff --git a/Src/SteamworksNET/GameWebCallback_t.cs b/Src/SteamworksNET/GameWebCallback_t.cs deleted file mode 100644 index 11b6c5f8..00000000 --- a/Src/SteamworksNET/GameWebCallback_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GameWebCallback_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(164)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GameWebCallback_t - { - public const int k_iCallback = 164; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_szURL; - } -} diff --git a/Src/SteamworksNET/GamepadTextInputDismissed_t.cs b/Src/SteamworksNET/GamepadTextInputDismissed_t.cs deleted file mode 100644 index 56f8590b..00000000 --- a/Src/SteamworksNET/GamepadTextInputDismissed_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GamepadTextInputDismissed_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(714)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GamepadTextInputDismissed_t - { - public const int k_iCallback = 714; - [MarshalAs(UnmanagedType.I1)] - public bool m_bSubmitted; - public uint m_unSubmittedText; - } -} diff --git a/Src/SteamworksNET/GetAuthSessionTicketResponse_t.cs b/Src/SteamworksNET/GetAuthSessionTicketResponse_t.cs deleted file mode 100644 index 2232d9b8..00000000 --- a/Src/SteamworksNET/GetAuthSessionTicketResponse_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GetAuthSessionTicketResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(163)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GetAuthSessionTicketResponse_t - { - public const int k_iCallback = 163; - public HAuthTicket m_hAuthTicket; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/GetUserItemVoteResult_t.cs b/Src/SteamworksNET/GetUserItemVoteResult_t.cs deleted file mode 100644 index ad2adda3..00000000 --- a/Src/SteamworksNET/GetUserItemVoteResult_t.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GetUserItemVoteResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3409)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GetUserItemVoteResult_t - { - public const int k_iCallback = 3409; - public PublishedFileId_t m_nPublishedFileId; - public EResult m_eResult; - [MarshalAs(UnmanagedType.I1)] - public bool m_bVotedUp; - [MarshalAs(UnmanagedType.I1)] - public bool m_bVotedDown; - [MarshalAs(UnmanagedType.I1)] - public bool m_bVoteSkipped; - } -} diff --git a/Src/SteamworksNET/GetVideoURLResult_t.cs b/Src/SteamworksNET/GetVideoURLResult_t.cs deleted file mode 100644 index f39245d3..00000000 --- a/Src/SteamworksNET/GetVideoURLResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GetVideoURLResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4611)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GetVideoURLResult_t - { - public const int k_iCallback = 4611; - public EResult m_eResult; - public AppId_t m_unVideoAppID; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_rgchURL; - } -} diff --git a/Src/SteamworksNET/GlobalAchievementPercentagesReady_t.cs b/Src/SteamworksNET/GlobalAchievementPercentagesReady_t.cs deleted file mode 100644 index bf89f7a5..00000000 --- a/Src/SteamworksNET/GlobalAchievementPercentagesReady_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GlobalAchievementPercentagesReady_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1110)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GlobalAchievementPercentagesReady_t - { - public const int k_iCallback = 1110; - public ulong m_nGameID; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/GlobalStatsReceived_t.cs b/Src/SteamworksNET/GlobalStatsReceived_t.cs deleted file mode 100644 index 775177ef..00000000 --- a/Src/SteamworksNET/GlobalStatsReceived_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.GlobalStatsReceived_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1112)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct GlobalStatsReceived_t - { - public const int k_iCallback = 1112; - public ulong m_nGameID; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/HAuthTicket.cs b/Src/SteamworksNET/HAuthTicket.cs deleted file mode 100644 index 39f295de..00000000 --- a/Src/SteamworksNET/HAuthTicket.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HAuthTicket -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HAuthTicket : IEquatable, IComparable - { - public static readonly HAuthTicket Invalid = new HAuthTicket(0U); - public uint m_HAuthTicket; - - public HAuthTicket(uint value) => this.m_HAuthTicket = value; - - public override string ToString() => this.m_HAuthTicket.ToString(); - - public override bool Equals(object other) => other is HAuthTicket hauthTicket && this == hauthTicket; - - public override int GetHashCode() => this.m_HAuthTicket.GetHashCode(); - - public static bool operator ==(HAuthTicket x, HAuthTicket y) => (int) x.m_HAuthTicket == (int) y.m_HAuthTicket; - - public static bool operator !=(HAuthTicket x, HAuthTicket y) => !(x == y); - - public static explicit operator HAuthTicket(uint value) => new HAuthTicket(value); - - public static explicit operator uint(HAuthTicket that) => that.m_HAuthTicket; - - public bool Equals(HAuthTicket other) => (int) this.m_HAuthTicket == (int) other.m_HAuthTicket; - - public int CompareTo(HAuthTicket other) => this.m_HAuthTicket.CompareTo(other.m_HAuthTicket); - } -} diff --git a/Src/SteamworksNET/HHTMLBrowser.cs b/Src/SteamworksNET/HHTMLBrowser.cs deleted file mode 100644 index e16c20cb..00000000 --- a/Src/SteamworksNET/HHTMLBrowser.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HHTMLBrowser -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HHTMLBrowser : IEquatable, IComparable - { - public static readonly HHTMLBrowser Invalid = new HHTMLBrowser(0U); - public uint m_HHTMLBrowser; - - public HHTMLBrowser(uint value) => this.m_HHTMLBrowser = value; - - public override string ToString() => this.m_HHTMLBrowser.ToString(); - - public override bool Equals(object other) => other is HHTMLBrowser hhtmlBrowser && this == hhtmlBrowser; - - public override int GetHashCode() => this.m_HHTMLBrowser.GetHashCode(); - - public static bool operator ==(HHTMLBrowser x, HHTMLBrowser y) => (int) x.m_HHTMLBrowser == (int) y.m_HHTMLBrowser; - - public static bool operator !=(HHTMLBrowser x, HHTMLBrowser y) => !(x == y); - - public static explicit operator HHTMLBrowser(uint value) => new HHTMLBrowser(value); - - public static explicit operator uint(HHTMLBrowser that) => that.m_HHTMLBrowser; - - public bool Equals(HHTMLBrowser other) => (int) this.m_HHTMLBrowser == (int) other.m_HHTMLBrowser; - - public int CompareTo(HHTMLBrowser other) => this.m_HHTMLBrowser.CompareTo(other.m_HHTMLBrowser); - } -} diff --git a/Src/SteamworksNET/HServerListRequest.cs b/Src/SteamworksNET/HServerListRequest.cs deleted file mode 100644 index 23f9fb1b..00000000 --- a/Src/SteamworksNET/HServerListRequest.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HServerListRequest -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HServerListRequest : IEquatable - { - public static readonly HServerListRequest Invalid = new HServerListRequest(IntPtr.Zero); - public IntPtr m_HServerListRequest; - - public HServerListRequest(IntPtr value) => this.m_HServerListRequest = value; - - public override string ToString() => this.m_HServerListRequest.ToString(); - - public override bool Equals(object other) => other is HServerListRequest hserverListRequest && this == hserverListRequest; - - public override int GetHashCode() => this.m_HServerListRequest.GetHashCode(); - - public static bool operator ==(HServerListRequest x, HServerListRequest y) => x.m_HServerListRequest == y.m_HServerListRequest; - - public static bool operator !=(HServerListRequest x, HServerListRequest y) => !(x == y); - - public static explicit operator HServerListRequest(IntPtr value) => new HServerListRequest(value); - - public static explicit operator IntPtr(HServerListRequest that) => that.m_HServerListRequest; - - public bool Equals(HServerListRequest other) => this.m_HServerListRequest == other.m_HServerListRequest; - } -} diff --git a/Src/SteamworksNET/HServerQuery.cs b/Src/SteamworksNET/HServerQuery.cs deleted file mode 100644 index a4711e01..00000000 --- a/Src/SteamworksNET/HServerQuery.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HServerQuery -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HServerQuery : IEquatable, IComparable - { - public static readonly HServerQuery Invalid = new HServerQuery(-1); - public int m_HServerQuery; - - public HServerQuery(int value) => this.m_HServerQuery = value; - - public override string ToString() => this.m_HServerQuery.ToString(); - - public override bool Equals(object other) => other is HServerQuery hserverQuery && this == hserverQuery; - - public override int GetHashCode() => this.m_HServerQuery.GetHashCode(); - - public static bool operator ==(HServerQuery x, HServerQuery y) => x.m_HServerQuery == y.m_HServerQuery; - - public static bool operator !=(HServerQuery x, HServerQuery y) => !(x == y); - - public static explicit operator HServerQuery(int value) => new HServerQuery(value); - - public static explicit operator int(HServerQuery that) => that.m_HServerQuery; - - public bool Equals(HServerQuery other) => this.m_HServerQuery == other.m_HServerQuery; - - public int CompareTo(HServerQuery other) => this.m_HServerQuery.CompareTo(other.m_HServerQuery); - } -} diff --git a/Src/SteamworksNET/HSteamPipe.cs b/Src/SteamworksNET/HSteamPipe.cs deleted file mode 100644 index a93be4d5..00000000 --- a/Src/SteamworksNET/HSteamPipe.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HSteamPipe -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HSteamPipe : IEquatable, IComparable - { - public int m_HSteamPipe; - - public HSteamPipe(int value) => this.m_HSteamPipe = value; - - public override string ToString() => this.m_HSteamPipe.ToString(); - - public override bool Equals(object other) => other is HSteamPipe hsteamPipe && this == hsteamPipe; - - public override int GetHashCode() => this.m_HSteamPipe.GetHashCode(); - - public static bool operator ==(HSteamPipe x, HSteamPipe y) => x.m_HSteamPipe == y.m_HSteamPipe; - - public static bool operator !=(HSteamPipe x, HSteamPipe y) => !(x == y); - - public static explicit operator HSteamPipe(int value) => new HSteamPipe(value); - - public static explicit operator int(HSteamPipe that) => that.m_HSteamPipe; - - public bool Equals(HSteamPipe other) => this.m_HSteamPipe == other.m_HSteamPipe; - - public int CompareTo(HSteamPipe other) => this.m_HSteamPipe.CompareTo(other.m_HSteamPipe); - } -} diff --git a/Src/SteamworksNET/HSteamUser.cs b/Src/SteamworksNET/HSteamUser.cs deleted file mode 100644 index ac69ba22..00000000 --- a/Src/SteamworksNET/HSteamUser.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HSteamUser -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HSteamUser : IEquatable, IComparable - { - public int m_HSteamUser; - - public HSteamUser(int value) => this.m_HSteamUser = value; - - public override string ToString() => this.m_HSteamUser.ToString(); - - public override bool Equals(object other) => other is HSteamUser hsteamUser && this == hsteamUser; - - public override int GetHashCode() => this.m_HSteamUser.GetHashCode(); - - public static bool operator ==(HSteamUser x, HSteamUser y) => x.m_HSteamUser == y.m_HSteamUser; - - public static bool operator !=(HSteamUser x, HSteamUser y) => !(x == y); - - public static explicit operator HSteamUser(int value) => new HSteamUser(value); - - public static explicit operator int(HSteamUser that) => that.m_HSteamUser; - - public bool Equals(HSteamUser other) => this.m_HSteamUser == other.m_HSteamUser; - - public int CompareTo(HSteamUser other) => this.m_HSteamUser.CompareTo(other.m_HSteamUser); - } -} diff --git a/Src/SteamworksNET/HTML_BrowserReady_t.cs b/Src/SteamworksNET/HTML_BrowserReady_t.cs deleted file mode 100644 index b250a00a..00000000 --- a/Src/SteamworksNET/HTML_BrowserReady_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_BrowserReady_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4501)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_BrowserReady_t - { - public const int k_iCallback = 4501; - public HHTMLBrowser unBrowserHandle; - } -} diff --git a/Src/SteamworksNET/HTML_CanGoBackAndForward_t.cs b/Src/SteamworksNET/HTML_CanGoBackAndForward_t.cs deleted file mode 100644 index 51e63e32..00000000 --- a/Src/SteamworksNET/HTML_CanGoBackAndForward_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_CanGoBackAndForward_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4510)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_CanGoBackAndForward_t - { - public const int k_iCallback = 4510; - public HHTMLBrowser unBrowserHandle; - [MarshalAs(UnmanagedType.I1)] - public bool bCanGoBack; - [MarshalAs(UnmanagedType.I1)] - public bool bCanGoForward; - } -} diff --git a/Src/SteamworksNET/HTML_ChangedTitle_t.cs b/Src/SteamworksNET/HTML_ChangedTitle_t.cs deleted file mode 100644 index 218ac94f..00000000 --- a/Src/SteamworksNET/HTML_ChangedTitle_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_ChangedTitle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4508)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_ChangedTitle_t - { - public const int k_iCallback = 4508; - public HHTMLBrowser unBrowserHandle; - public string pchTitle; - } -} diff --git a/Src/SteamworksNET/HTML_CloseBrowser_t.cs b/Src/SteamworksNET/HTML_CloseBrowser_t.cs deleted file mode 100644 index 6d94a2cb..00000000 --- a/Src/SteamworksNET/HTML_CloseBrowser_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_CloseBrowser_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4504)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_CloseBrowser_t - { - public const int k_iCallback = 4504; - public HHTMLBrowser unBrowserHandle; - } -} diff --git a/Src/SteamworksNET/HTML_FileOpenDialog_t.cs b/Src/SteamworksNET/HTML_FileOpenDialog_t.cs deleted file mode 100644 index abd6d8ff..00000000 --- a/Src/SteamworksNET/HTML_FileOpenDialog_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_FileOpenDialog_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4516)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_FileOpenDialog_t - { - public const int k_iCallback = 4516; - public HHTMLBrowser unBrowserHandle; - public string pchTitle; - public string pchInitialFile; - } -} diff --git a/Src/SteamworksNET/HTML_FinishedRequest_t.cs b/Src/SteamworksNET/HTML_FinishedRequest_t.cs deleted file mode 100644 index 64209213..00000000 --- a/Src/SteamworksNET/HTML_FinishedRequest_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_FinishedRequest_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4506)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_FinishedRequest_t - { - public const int k_iCallback = 4506; - public HHTMLBrowser unBrowserHandle; - public string pchURL; - public string pchPageTitle; - } -} diff --git a/Src/SteamworksNET/HTML_HideToolTip_t.cs b/Src/SteamworksNET/HTML_HideToolTip_t.cs deleted file mode 100644 index 73a44220..00000000 --- a/Src/SteamworksNET/HTML_HideToolTip_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_HideToolTip_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4526)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_HideToolTip_t - { - public const int k_iCallback = 4526; - public HHTMLBrowser unBrowserHandle; - } -} diff --git a/Src/SteamworksNET/HTML_HorizontalScroll_t.cs b/Src/SteamworksNET/HTML_HorizontalScroll_t.cs deleted file mode 100644 index 6a7bc22d..00000000 --- a/Src/SteamworksNET/HTML_HorizontalScroll_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_HorizontalScroll_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4511)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_HorizontalScroll_t - { - public const int k_iCallback = 4511; - public HHTMLBrowser unBrowserHandle; - public uint unScrollMax; - public uint unScrollCurrent; - public float flPageScale; - [MarshalAs(UnmanagedType.I1)] - public bool bVisible; - public uint unPageSize; - } -} diff --git a/Src/SteamworksNET/HTML_JSAlert_t.cs b/Src/SteamworksNET/HTML_JSAlert_t.cs deleted file mode 100644 index ed69f752..00000000 --- a/Src/SteamworksNET/HTML_JSAlert_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_JSAlert_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4514)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_JSAlert_t - { - public const int k_iCallback = 4514; - public HHTMLBrowser unBrowserHandle; - public string pchMessage; - } -} diff --git a/Src/SteamworksNET/HTML_JSConfirm_t.cs b/Src/SteamworksNET/HTML_JSConfirm_t.cs deleted file mode 100644 index b4cda317..00000000 --- a/Src/SteamworksNET/HTML_JSConfirm_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_JSConfirm_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4515)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_JSConfirm_t - { - public const int k_iCallback = 4515; - public HHTMLBrowser unBrowserHandle; - public string pchMessage; - } -} diff --git a/Src/SteamworksNET/HTML_LinkAtPosition_t.cs b/Src/SteamworksNET/HTML_LinkAtPosition_t.cs deleted file mode 100644 index 4d4c6bc0..00000000 --- a/Src/SteamworksNET/HTML_LinkAtPosition_t.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_LinkAtPosition_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4513)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_LinkAtPosition_t - { - public const int k_iCallback = 4513; - public HHTMLBrowser unBrowserHandle; - public uint x; - public uint y; - public string pchURL; - [MarshalAs(UnmanagedType.I1)] - public bool bInput; - [MarshalAs(UnmanagedType.I1)] - public bool bLiveLink; - } -} diff --git a/Src/SteamworksNET/HTML_NeedsPaint_t.cs b/Src/SteamworksNET/HTML_NeedsPaint_t.cs deleted file mode 100644 index 3327ce18..00000000 --- a/Src/SteamworksNET/HTML_NeedsPaint_t.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_NeedsPaint_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4502)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_NeedsPaint_t - { - public const int k_iCallback = 4502; - public HHTMLBrowser unBrowserHandle; - public IntPtr pBGRA; - public uint unWide; - public uint unTall; - public uint unUpdateX; - public uint unUpdateY; - public uint unUpdateWide; - public uint unUpdateTall; - public uint unScrollX; - public uint unScrollY; - public float flPageScale; - public uint unPageSerial; - } -} diff --git a/Src/SteamworksNET/HTML_NewWindow_t.cs b/Src/SteamworksNET/HTML_NewWindow_t.cs deleted file mode 100644 index 96903f52..00000000 --- a/Src/SteamworksNET/HTML_NewWindow_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_NewWindow_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4521)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_NewWindow_t - { - public const int k_iCallback = 4521; - public HHTMLBrowser unBrowserHandle; - public string pchURL; - public uint unX; - public uint unY; - public uint unWide; - public uint unTall; - public HHTMLBrowser unNewWindow_BrowserHandle; - } -} diff --git a/Src/SteamworksNET/HTML_OpenLinkInNewTab_t.cs b/Src/SteamworksNET/HTML_OpenLinkInNewTab_t.cs deleted file mode 100644 index e403275c..00000000 --- a/Src/SteamworksNET/HTML_OpenLinkInNewTab_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_OpenLinkInNewTab_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4507)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_OpenLinkInNewTab_t - { - public const int k_iCallback = 4507; - public HHTMLBrowser unBrowserHandle; - public string pchURL; - } -} diff --git a/Src/SteamworksNET/HTML_SearchResults_t.cs b/Src/SteamworksNET/HTML_SearchResults_t.cs deleted file mode 100644 index 5c7c93d8..00000000 --- a/Src/SteamworksNET/HTML_SearchResults_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_SearchResults_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4509)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_SearchResults_t - { - public const int k_iCallback = 4509; - public HHTMLBrowser unBrowserHandle; - public uint unResults; - public uint unCurrentMatch; - } -} diff --git a/Src/SteamworksNET/HTML_SetCursor_t.cs b/Src/SteamworksNET/HTML_SetCursor_t.cs deleted file mode 100644 index b6047578..00000000 --- a/Src/SteamworksNET/HTML_SetCursor_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_SetCursor_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4522)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_SetCursor_t - { - public const int k_iCallback = 4522; - public HHTMLBrowser unBrowserHandle; - public uint eMouseCursor; - } -} diff --git a/Src/SteamworksNET/HTML_ShowToolTip_t.cs b/Src/SteamworksNET/HTML_ShowToolTip_t.cs deleted file mode 100644 index e2a219c6..00000000 --- a/Src/SteamworksNET/HTML_ShowToolTip_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_ShowToolTip_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4524)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_ShowToolTip_t - { - public const int k_iCallback = 4524; - public HHTMLBrowser unBrowserHandle; - public string pchMsg; - } -} diff --git a/Src/SteamworksNET/HTML_StartRequest_t.cs b/Src/SteamworksNET/HTML_StartRequest_t.cs deleted file mode 100644 index 867822a7..00000000 --- a/Src/SteamworksNET/HTML_StartRequest_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_StartRequest_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4503)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_StartRequest_t - { - public const int k_iCallback = 4503; - public HHTMLBrowser unBrowserHandle; - public string pchURL; - public string pchTarget; - public string pchPostData; - [MarshalAs(UnmanagedType.I1)] - public bool bIsRedirect; - } -} diff --git a/Src/SteamworksNET/HTML_StatusText_t.cs b/Src/SteamworksNET/HTML_StatusText_t.cs deleted file mode 100644 index 07a36bbd..00000000 --- a/Src/SteamworksNET/HTML_StatusText_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_StatusText_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4523)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_StatusText_t - { - public const int k_iCallback = 4523; - public HHTMLBrowser unBrowserHandle; - public string pchMsg; - } -} diff --git a/Src/SteamworksNET/HTML_URLChanged_t.cs b/Src/SteamworksNET/HTML_URLChanged_t.cs deleted file mode 100644 index a3ca4321..00000000 --- a/Src/SteamworksNET/HTML_URLChanged_t.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_URLChanged_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4505)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_URLChanged_t - { - public const int k_iCallback = 4505; - public HHTMLBrowser unBrowserHandle; - public string pchURL; - public string pchPostData; - [MarshalAs(UnmanagedType.I1)] - public bool bIsRedirect; - public string pchPageTitle; - [MarshalAs(UnmanagedType.I1)] - public bool bNewNavigation; - } -} diff --git a/Src/SteamworksNET/HTML_UpdateToolTip_t.cs b/Src/SteamworksNET/HTML_UpdateToolTip_t.cs deleted file mode 100644 index 05095b28..00000000 --- a/Src/SteamworksNET/HTML_UpdateToolTip_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_UpdateToolTip_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4525)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_UpdateToolTip_t - { - public const int k_iCallback = 4525; - public HHTMLBrowser unBrowserHandle; - public string pchMsg; - } -} diff --git a/Src/SteamworksNET/HTML_VerticalScroll_t.cs b/Src/SteamworksNET/HTML_VerticalScroll_t.cs deleted file mode 100644 index 588f0ef8..00000000 --- a/Src/SteamworksNET/HTML_VerticalScroll_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTML_VerticalScroll_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4512)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTML_VerticalScroll_t - { - public const int k_iCallback = 4512; - public HHTMLBrowser unBrowserHandle; - public uint unScrollMax; - public uint unScrollCurrent; - public float flPageScale; - [MarshalAs(UnmanagedType.I1)] - public bool bVisible; - public uint unPageSize; - } -} diff --git a/Src/SteamworksNET/HTTPCookieContainerHandle.cs b/Src/SteamworksNET/HTTPCookieContainerHandle.cs deleted file mode 100644 index 17418687..00000000 --- a/Src/SteamworksNET/HTTPCookieContainerHandle.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTTPCookieContainerHandle -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HTTPCookieContainerHandle : - IEquatable, - IComparable - { - public static readonly HTTPCookieContainerHandle Invalid = new HTTPCookieContainerHandle(0U); - public uint m_HTTPCookieContainerHandle; - - public HTTPCookieContainerHandle(uint value) => this.m_HTTPCookieContainerHandle = value; - - public override string ToString() => this.m_HTTPCookieContainerHandle.ToString(); - - public override bool Equals(object other) => other is HTTPCookieContainerHandle cookieContainerHandle && this == cookieContainerHandle; - - public override int GetHashCode() => this.m_HTTPCookieContainerHandle.GetHashCode(); - - public static bool operator ==(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y) => (int) x.m_HTTPCookieContainerHandle == (int) y.m_HTTPCookieContainerHandle; - - public static bool operator !=(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y) => !(x == y); - - public static explicit operator HTTPCookieContainerHandle(uint value) => new HTTPCookieContainerHandle(value); - - public static explicit operator uint(HTTPCookieContainerHandle that) => that.m_HTTPCookieContainerHandle; - - public bool Equals(HTTPCookieContainerHandle other) => (int) this.m_HTTPCookieContainerHandle == (int) other.m_HTTPCookieContainerHandle; - - public int CompareTo(HTTPCookieContainerHandle other) => this.m_HTTPCookieContainerHandle.CompareTo(other.m_HTTPCookieContainerHandle); - } -} diff --git a/Src/SteamworksNET/HTTPRequestCompleted_t.cs b/Src/SteamworksNET/HTTPRequestCompleted_t.cs deleted file mode 100644 index 123ea98e..00000000 --- a/Src/SteamworksNET/HTTPRequestCompleted_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTTPRequestCompleted_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(2101)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTTPRequestCompleted_t - { - public const int k_iCallback = 2101; - public HTTPRequestHandle m_hRequest; - public ulong m_ulContextValue; - [MarshalAs(UnmanagedType.I1)] - public bool m_bRequestSuccessful; - public EHTTPStatusCode m_eStatusCode; - public uint m_unBodySize; - } -} diff --git a/Src/SteamworksNET/HTTPRequestDataReceived_t.cs b/Src/SteamworksNET/HTTPRequestDataReceived_t.cs deleted file mode 100644 index 91d90571..00000000 --- a/Src/SteamworksNET/HTTPRequestDataReceived_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTTPRequestDataReceived_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(2103)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTTPRequestDataReceived_t - { - public const int k_iCallback = 2103; - public HTTPRequestHandle m_hRequest; - public ulong m_ulContextValue; - public uint m_cOffset; - public uint m_cBytesReceived; - } -} diff --git a/Src/SteamworksNET/HTTPRequestHandle.cs b/Src/SteamworksNET/HTTPRequestHandle.cs deleted file mode 100644 index 200dd110..00000000 --- a/Src/SteamworksNET/HTTPRequestHandle.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTTPRequestHandle -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct HTTPRequestHandle : IEquatable, IComparable - { - public static readonly HTTPRequestHandle Invalid = new HTTPRequestHandle(0U); - public uint m_HTTPRequestHandle; - - public HTTPRequestHandle(uint value) => this.m_HTTPRequestHandle = value; - - public override string ToString() => this.m_HTTPRequestHandle.ToString(); - - public override bool Equals(object other) => other is HTTPRequestHandle httpRequestHandle && this == httpRequestHandle; - - public override int GetHashCode() => this.m_HTTPRequestHandle.GetHashCode(); - - public static bool operator ==(HTTPRequestHandle x, HTTPRequestHandle y) => (int) x.m_HTTPRequestHandle == (int) y.m_HTTPRequestHandle; - - public static bool operator !=(HTTPRequestHandle x, HTTPRequestHandle y) => !(x == y); - - public static explicit operator HTTPRequestHandle(uint value) => new HTTPRequestHandle(value); - - public static explicit operator uint(HTTPRequestHandle that) => that.m_HTTPRequestHandle; - - public bool Equals(HTTPRequestHandle other) => (int) this.m_HTTPRequestHandle == (int) other.m_HTTPRequestHandle; - - public int CompareTo(HTTPRequestHandle other) => this.m_HTTPRequestHandle.CompareTo(other.m_HTTPRequestHandle); - } -} diff --git a/Src/SteamworksNET/HTTPRequestHeadersReceived_t.cs b/Src/SteamworksNET/HTTPRequestHeadersReceived_t.cs deleted file mode 100644 index 55c80ccd..00000000 --- a/Src/SteamworksNET/HTTPRequestHeadersReceived_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.HTTPRequestHeadersReceived_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(2102)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct HTTPRequestHeadersReceived_t - { - public const int k_iCallback = 2102; - public HTTPRequestHandle m_hRequest; - public ulong m_ulContextValue; - } -} diff --git a/Src/SteamworksNET/IPCFailure_t.cs b/Src/SteamworksNET/IPCFailure_t.cs deleted file mode 100644 index 791aaca7..00000000 --- a/Src/SteamworksNET/IPCFailure_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.IPCFailure_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(117)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct IPCFailure_t - { - public const int k_iCallback = 117; - public byte m_eFailureType; - } -} diff --git a/Src/SteamworksNET/IPCountry_t.cs b/Src/SteamworksNET/IPCountry_t.cs deleted file mode 100644 index 3f42051e..00000000 --- a/Src/SteamworksNET/IPCountry_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.IPCountry_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(701)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct IPCountry_t - { - public const int k_iCallback = 701; - } -} diff --git a/Src/SteamworksNET/ISteamMatchmakingPingResponse.cs b/Src/SteamworksNET/ISteamMatchmakingPingResponse.cs deleted file mode 100644 index f4468011..00000000 --- a/Src/SteamworksNET/ISteamMatchmakingPingResponse.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ISteamMatchmakingPingResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public class ISteamMatchmakingPingResponse - { - private ISteamMatchmakingPingResponse.VTable m_VTable; - private IntPtr m_pVTable; - private GCHandle m_pGCHandle; - private ISteamMatchmakingPingResponse.ServerResponded m_ServerResponded; - private ISteamMatchmakingPingResponse.ServerFailedToRespond m_ServerFailedToRespond; - - public ISteamMatchmakingPingResponse( - ISteamMatchmakingPingResponse.ServerResponded onServerResponded, - ISteamMatchmakingPingResponse.ServerFailedToRespond onServerFailedToRespond) - { - this.m_ServerResponded = onServerResponded != null && onServerFailedToRespond != null ? onServerResponded : throw new ArgumentNullException(); - this.m_ServerFailedToRespond = onServerFailedToRespond; - this.m_VTable = new ISteamMatchmakingPingResponse.VTable() - { - m_VTServerResponded = new ISteamMatchmakingPingResponse.InternalServerResponded(this.InternalOnServerResponded), - m_VTServerFailedToRespond = new ISteamMatchmakingPingResponse.InternalServerFailedToRespond(this.InternalOnServerFailedToRespond) - }; - this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (ISteamMatchmakingPingResponse.VTable))); - Marshal.StructureToPtr((object) this.m_VTable, this.m_pVTable, false); - this.m_pGCHandle = GCHandle.Alloc((object) this.m_pVTable, GCHandleType.Pinned); - } - - ~ISteamMatchmakingPingResponse() - { - if (this.m_pVTable != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pVTable); - if (!this.m_pGCHandle.IsAllocated) - return; - this.m_pGCHandle.Free(); - } - - private void InternalOnServerResponded(IntPtr thisptr, gameserveritem_t server) => this.m_ServerResponded(server); - - private void InternalOnServerFailedToRespond(IntPtr thisptr) => this.m_ServerFailedToRespond(); - - public static explicit operator IntPtr(ISteamMatchmakingPingResponse that) => that.m_pGCHandle.AddrOfPinnedObject(); - - public delegate void ServerResponded(gameserveritem_t server); - - public delegate void ServerFailedToRespond(); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - private delegate void InternalServerResponded(IntPtr thisptr, gameserveritem_t server); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - private delegate void InternalServerFailedToRespond(IntPtr thisptr); - - [StructLayout(LayoutKind.Sequential)] - private class VTable - { - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingPingResponse.InternalServerResponded m_VTServerResponded; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingPingResponse.InternalServerFailedToRespond m_VTServerFailedToRespond; - } - } -} diff --git a/Src/SteamworksNET/ISteamMatchmakingPlayersResponse.cs b/Src/SteamworksNET/ISteamMatchmakingPlayersResponse.cs deleted file mode 100644 index bcda3d33..00000000 --- a/Src/SteamworksNET/ISteamMatchmakingPlayersResponse.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ISteamMatchmakingPlayersResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public class ISteamMatchmakingPlayersResponse - { - private ISteamMatchmakingPlayersResponse.VTable m_VTable; - private IntPtr m_pVTable; - private GCHandle m_pGCHandle; - private ISteamMatchmakingPlayersResponse.AddPlayerToList m_AddPlayerToList; - private ISteamMatchmakingPlayersResponse.PlayersFailedToRespond m_PlayersFailedToRespond; - private ISteamMatchmakingPlayersResponse.PlayersRefreshComplete m_PlayersRefreshComplete; - - public ISteamMatchmakingPlayersResponse( - ISteamMatchmakingPlayersResponse.AddPlayerToList onAddPlayerToList, - ISteamMatchmakingPlayersResponse.PlayersFailedToRespond onPlayersFailedToRespond, - ISteamMatchmakingPlayersResponse.PlayersRefreshComplete onPlayersRefreshComplete) - { - if (onAddPlayerToList == null || onPlayersFailedToRespond == null || onPlayersRefreshComplete == null) - throw new ArgumentNullException(); - this.m_AddPlayerToList = onAddPlayerToList; - this.m_PlayersFailedToRespond = onPlayersFailedToRespond; - this.m_PlayersRefreshComplete = onPlayersRefreshComplete; - this.m_VTable = new ISteamMatchmakingPlayersResponse.VTable() - { - m_VTAddPlayerToList = new ISteamMatchmakingPlayersResponse.InternalAddPlayerToList(this.InternalOnAddPlayerToList), - m_VTPlayersFailedToRespond = new ISteamMatchmakingPlayersResponse.InternalPlayersFailedToRespond(this.InternalOnPlayersFailedToRespond), - m_VTPlayersRefreshComplete = new ISteamMatchmakingPlayersResponse.InternalPlayersRefreshComplete(this.InternalOnPlayersRefreshComplete) - }; - this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (ISteamMatchmakingPlayersResponse.VTable))); - Marshal.StructureToPtr((object) this.m_VTable, this.m_pVTable, false); - this.m_pGCHandle = GCHandle.Alloc((object) this.m_pVTable, GCHandleType.Pinned); - } - - ~ISteamMatchmakingPlayersResponse() - { - if (this.m_pVTable != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pVTable); - if (!this.m_pGCHandle.IsAllocated) - return; - this.m_pGCHandle.Free(); - } - - private void InternalOnAddPlayerToList( - IntPtr thisptr, - IntPtr pchName, - int nScore, - float flTimePlayed) - { - this.m_AddPlayerToList(InteropHelp.PtrToStringUTF8(pchName), nScore, flTimePlayed); - } - - private void InternalOnPlayersFailedToRespond(IntPtr thisptr) => this.m_PlayersFailedToRespond(); - - private void InternalOnPlayersRefreshComplete(IntPtr thisptr) => this.m_PlayersRefreshComplete(); - - public static explicit operator IntPtr(ISteamMatchmakingPlayersResponse that) => that.m_pGCHandle.AddrOfPinnedObject(); - - public delegate void AddPlayerToList(string pchName, int nScore, float flTimePlayed); - - public delegate void PlayersFailedToRespond(); - - public delegate void PlayersRefreshComplete(); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void InternalAddPlayerToList( - IntPtr thisptr, - IntPtr pchName, - int nScore, - float flTimePlayed); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void InternalPlayersFailedToRespond(IntPtr thisptr); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void InternalPlayersRefreshComplete(IntPtr thisptr); - - [StructLayout(LayoutKind.Sequential)] - private class VTable - { - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingPlayersResponse.InternalAddPlayerToList m_VTAddPlayerToList; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingPlayersResponse.InternalPlayersFailedToRespond m_VTPlayersFailedToRespond; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingPlayersResponse.InternalPlayersRefreshComplete m_VTPlayersRefreshComplete; - } - } -} diff --git a/Src/SteamworksNET/ISteamMatchmakingRulesResponse.cs b/Src/SteamworksNET/ISteamMatchmakingRulesResponse.cs deleted file mode 100644 index 1aaa40ce..00000000 --- a/Src/SteamworksNET/ISteamMatchmakingRulesResponse.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ISteamMatchmakingRulesResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public class ISteamMatchmakingRulesResponse - { - private ISteamMatchmakingRulesResponse.VTable m_VTable; - private IntPtr m_pVTable; - private GCHandle m_pGCHandle; - private ISteamMatchmakingRulesResponse.RulesResponded m_RulesResponded; - private ISteamMatchmakingRulesResponse.RulesFailedToRespond m_RulesFailedToRespond; - private ISteamMatchmakingRulesResponse.RulesRefreshComplete m_RulesRefreshComplete; - - public ISteamMatchmakingRulesResponse( - ISteamMatchmakingRulesResponse.RulesResponded onRulesResponded, - ISteamMatchmakingRulesResponse.RulesFailedToRespond onRulesFailedToRespond, - ISteamMatchmakingRulesResponse.RulesRefreshComplete onRulesRefreshComplete) - { - if (onRulesResponded == null || onRulesFailedToRespond == null || onRulesRefreshComplete == null) - throw new ArgumentNullException(); - this.m_RulesResponded = onRulesResponded; - this.m_RulesFailedToRespond = onRulesFailedToRespond; - this.m_RulesRefreshComplete = onRulesRefreshComplete; - this.m_VTable = new ISteamMatchmakingRulesResponse.VTable() - { - m_VTRulesResponded = new ISteamMatchmakingRulesResponse.InternalRulesResponded(this.InternalOnRulesResponded), - m_VTRulesFailedToRespond = new ISteamMatchmakingRulesResponse.InternalRulesFailedToRespond(this.InternalOnRulesFailedToRespond), - m_VTRulesRefreshComplete = new ISteamMatchmakingRulesResponse.InternalRulesRefreshComplete(this.InternalOnRulesRefreshComplete) - }; - this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (ISteamMatchmakingRulesResponse.VTable))); - Marshal.StructureToPtr((object) this.m_VTable, this.m_pVTable, false); - this.m_pGCHandle = GCHandle.Alloc((object) this.m_pVTable, GCHandleType.Pinned); - } - - ~ISteamMatchmakingRulesResponse() - { - if (this.m_pVTable != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pVTable); - if (!this.m_pGCHandle.IsAllocated) - return; - this.m_pGCHandle.Free(); - } - - private void InternalOnRulesResponded(IntPtr thisptr, IntPtr pchRule, IntPtr pchValue) => this.m_RulesResponded(InteropHelp.PtrToStringUTF8(pchRule), InteropHelp.PtrToStringUTF8(pchValue)); - - private void InternalOnRulesFailedToRespond(IntPtr thisptr) => this.m_RulesFailedToRespond(); - - private void InternalOnRulesRefreshComplete(IntPtr thisptr) => this.m_RulesRefreshComplete(); - - public static explicit operator IntPtr(ISteamMatchmakingRulesResponse that) => that.m_pGCHandle.AddrOfPinnedObject(); - - public delegate void RulesResponded(string pchRule, string pchValue); - - public delegate void RulesFailedToRespond(); - - public delegate void RulesRefreshComplete(); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void InternalRulesResponded(IntPtr thisptr, IntPtr pchRule, IntPtr pchValue); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void InternalRulesFailedToRespond(IntPtr thisptr); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - public delegate void InternalRulesRefreshComplete(IntPtr thisptr); - - [StructLayout(LayoutKind.Sequential)] - private class VTable - { - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingRulesResponse.InternalRulesResponded m_VTRulesResponded; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingRulesResponse.InternalRulesFailedToRespond m_VTRulesFailedToRespond; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingRulesResponse.InternalRulesRefreshComplete m_VTRulesRefreshComplete; - } - } -} diff --git a/Src/SteamworksNET/ISteamMatchmakingServerListResponse.cs b/Src/SteamworksNET/ISteamMatchmakingServerListResponse.cs deleted file mode 100644 index 6ef81c2a..00000000 --- a/Src/SteamworksNET/ISteamMatchmakingServerListResponse.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ISteamMatchmakingServerListResponse -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public class ISteamMatchmakingServerListResponse - { - private ISteamMatchmakingServerListResponse.VTable m_VTable; - private IntPtr m_pVTable; - private GCHandle m_pGCHandle; - private ISteamMatchmakingServerListResponse.ServerResponded m_ServerResponded; - private ISteamMatchmakingServerListResponse.ServerFailedToRespond m_ServerFailedToRespond; - private ISteamMatchmakingServerListResponse.RefreshComplete m_RefreshComplete; - - public ISteamMatchmakingServerListResponse( - ISteamMatchmakingServerListResponse.ServerResponded onServerResponded, - ISteamMatchmakingServerListResponse.ServerFailedToRespond onServerFailedToRespond, - ISteamMatchmakingServerListResponse.RefreshComplete onRefreshComplete) - { - if (onServerResponded == null || onServerFailedToRespond == null || onRefreshComplete == null) - throw new ArgumentNullException(); - this.m_ServerResponded = onServerResponded; - this.m_ServerFailedToRespond = onServerFailedToRespond; - this.m_RefreshComplete = onRefreshComplete; - this.m_VTable = new ISteamMatchmakingServerListResponse.VTable() - { - m_VTServerResponded = new ISteamMatchmakingServerListResponse.InternalServerResponded(this.InternalOnServerResponded), - m_VTServerFailedToRespond = new ISteamMatchmakingServerListResponse.InternalServerFailedToRespond(this.InternalOnServerFailedToRespond), - m_VTRefreshComplete = new ISteamMatchmakingServerListResponse.InternalRefreshComplete(this.InternalOnRefreshComplete) - }; - this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (ISteamMatchmakingServerListResponse.VTable))); - Marshal.StructureToPtr((object) this.m_VTable, this.m_pVTable, false); - this.m_pGCHandle = GCHandle.Alloc((object) this.m_pVTable, GCHandleType.Pinned); - } - - ~ISteamMatchmakingServerListResponse() - { - if (this.m_pVTable != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pVTable); - if (!this.m_pGCHandle.IsAllocated) - return; - this.m_pGCHandle.Free(); - } - - private void InternalOnServerResponded( - IntPtr thisptr, - HServerListRequest hRequest, - int iServer) - { - this.m_ServerResponded(hRequest, iServer); - } - - private void InternalOnServerFailedToRespond( - IntPtr thisptr, - HServerListRequest hRequest, - int iServer) - { - this.m_ServerFailedToRespond(hRequest, iServer); - } - - private void InternalOnRefreshComplete( - IntPtr thisptr, - HServerListRequest hRequest, - EMatchMakingServerResponse response) - { - this.m_RefreshComplete(hRequest, response); - } - - public static explicit operator IntPtr(ISteamMatchmakingServerListResponse that) => that.m_pGCHandle.AddrOfPinnedObject(); - - public delegate void ServerResponded(HServerListRequest hRequest, int iServer); - - public delegate void ServerFailedToRespond(HServerListRequest hRequest, int iServer); - - public delegate void RefreshComplete( - HServerListRequest hRequest, - EMatchMakingServerResponse response); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - private delegate void InternalServerResponded( - IntPtr thisptr, - HServerListRequest hRequest, - int iServer); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - private delegate void InternalServerFailedToRespond( - IntPtr thisptr, - HServerListRequest hRequest, - int iServer); - - [UnmanagedFunctionPointer(CallingConvention.ThisCall)] - private delegate void InternalRefreshComplete( - IntPtr thisptr, - HServerListRequest hRequest, - EMatchMakingServerResponse response); - - [StructLayout(LayoutKind.Sequential)] - private class VTable - { - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingServerListResponse.InternalServerResponded m_VTServerResponded; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingServerListResponse.InternalServerFailedToRespond m_VTServerFailedToRespond; - [MarshalAs(UnmanagedType.FunctionPtr)] - [NonSerialized] - public ISteamMatchmakingServerListResponse.InternalRefreshComplete m_VTRefreshComplete; - } - } -} diff --git a/Src/SteamworksNET/InteropHelp.cs b/Src/SteamworksNET/InteropHelp.cs deleted file mode 100644 index cf1f92f1..00000000 --- a/Src/SteamworksNET/InteropHelp.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.InteropHelp -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using Microsoft.Win32.SafeHandles; -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -namespace Steamworks -{ - public class InteropHelp - { - public static void TestIfPlatformSupported() - { - } - - public static void TestIfAvailableClient() - { - InteropHelp.TestIfPlatformSupported(); - if (NativeMethods.SteamClient() == IntPtr.Zero) - throw new InvalidOperationException("Steamworks is not initialized."); - } - - public static void TestIfAvailableGameServer() - { - InteropHelp.TestIfPlatformSupported(); - if (NativeMethods.SteamGameServerClient() == IntPtr.Zero) - throw new InvalidOperationException("Steamworks is not initialized."); - } - - public static string PtrToStringUTF8(IntPtr nativeUtf8) - { - if (nativeUtf8 == IntPtr.Zero) - return (string) null; - int ofs = 0; - while (Marshal.ReadByte(nativeUtf8, ofs) != (byte) 0) - ++ofs; - if (ofs == 0) - return string.Empty; - byte[] numArray = new byte[ofs]; - Marshal.Copy(nativeUtf8, numArray, 0, numArray.Length); - return Encoding.UTF8.GetString(numArray); - } - - public class UTF8StringHandle : SafeHandleZeroOrMinusOneIsInvalid - { - public UTF8StringHandle(string str) - : base(true) - { - if (str == null) - { - this.SetHandle(IntPtr.Zero); - } - else - { - byte[] numArray = new byte[Encoding.UTF8.GetByteCount(str) + 1]; - Encoding.UTF8.GetBytes(str, 0, str.Length, numArray, 0); - IntPtr num = Marshal.AllocHGlobal(numArray.Length); - Marshal.Copy(numArray, 0, num, numArray.Length); - this.SetHandle(num); - } - } - - protected override bool ReleaseHandle() - { - if (!this.IsInvalid) - Marshal.FreeHGlobal(this.handle); - return true; - } - } - - public class SteamParamStringArray - { - private IntPtr[] m_Strings; - private IntPtr m_ptrStrings; - private IntPtr m_pSteamParamStringArray; - - public SteamParamStringArray(IList strings) - { - if (strings == null) - { - this.m_pSteamParamStringArray = IntPtr.Zero; - } - else - { - this.m_Strings = new IntPtr[strings.Count]; - for (int index = 0; index < strings.Count; ++index) - { - byte[] numArray = new byte[Encoding.UTF8.GetByteCount(strings[index]) + 1]; - Encoding.UTF8.GetBytes(strings[index], 0, strings[index].Length, numArray, 0); - this.m_Strings[index] = Marshal.AllocHGlobal(numArray.Length); - Marshal.Copy(numArray, 0, this.m_Strings[index], numArray.Length); - } - this.m_ptrStrings = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (IntPtr)) * this.m_Strings.Length); - SteamParamStringArray_t structure = new SteamParamStringArray_t() - { - m_ppStrings = this.m_ptrStrings, - m_nNumStrings = this.m_Strings.Length - }; - Marshal.Copy(this.m_Strings, 0, structure.m_ppStrings, this.m_Strings.Length); - this.m_pSteamParamStringArray = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (SteamParamStringArray_t))); - Marshal.StructureToPtr((object) structure, this.m_pSteamParamStringArray, false); - } - } - - ~SteamParamStringArray() - { - foreach (IntPtr hglobal in this.m_Strings) - Marshal.FreeHGlobal(hglobal); - if (this.m_ptrStrings != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_ptrStrings); - if (!(this.m_pSteamParamStringArray != IntPtr.Zero)) - return; - Marshal.FreeHGlobal(this.m_pSteamParamStringArray); - } - - public static implicit operator IntPtr(InteropHelp.SteamParamStringArray that) => that.m_pSteamParamStringArray; - } - } -} diff --git a/Src/SteamworksNET/ItemInstalled_t.cs b/Src/SteamworksNET/ItemInstalled_t.cs deleted file mode 100644 index 0d986284..00000000 --- a/Src/SteamworksNET/ItemInstalled_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ItemInstalled_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3405)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct ItemInstalled_t - { - public const int k_iCallback = 3405; - public AppId_t m_unAppID; - public PublishedFileId_t m_nPublishedFileId; - } -} diff --git a/Src/SteamworksNET/JoinClanChatRoomCompletionResult_t.cs b/Src/SteamworksNET/JoinClanChatRoomCompletionResult_t.cs deleted file mode 100644 index 35afa98b..00000000 --- a/Src/SteamworksNET/JoinClanChatRoomCompletionResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.JoinClanChatRoomCompletionResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(342)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct JoinClanChatRoomCompletionResult_t - { - public const int k_iCallback = 342; - public CSteamID m_steamIDClanChat; - public EChatRoomEnterResponse m_eChatRoomEnterResponse; - } -} diff --git a/Src/SteamworksNET/LeaderboardEntry_t.cs b/Src/SteamworksNET/LeaderboardEntry_t.cs deleted file mode 100644 index 57671495..00000000 --- a/Src/SteamworksNET/LeaderboardEntry_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LeaderboardEntry_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LeaderboardEntry_t - { - public CSteamID m_steamIDUser; - public int m_nGlobalRank; - public int m_nScore; - public int m_cDetails; - public UGCHandle_t m_hUGC; - } -} diff --git a/Src/SteamworksNET/LeaderboardFindResult_t.cs b/Src/SteamworksNET/LeaderboardFindResult_t.cs deleted file mode 100644 index 51b0f085..00000000 --- a/Src/SteamworksNET/LeaderboardFindResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LeaderboardFindResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1104)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LeaderboardFindResult_t - { - public const int k_iCallback = 1104; - public SteamLeaderboard_t m_hSteamLeaderboard; - public byte m_bLeaderboardFound; - } -} diff --git a/Src/SteamworksNET/LeaderboardScoreUploaded_t.cs b/Src/SteamworksNET/LeaderboardScoreUploaded_t.cs deleted file mode 100644 index 855097c1..00000000 --- a/Src/SteamworksNET/LeaderboardScoreUploaded_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LeaderboardScoreUploaded_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1106)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LeaderboardScoreUploaded_t - { - public const int k_iCallback = 1106; - public byte m_bSuccess; - public SteamLeaderboard_t m_hSteamLeaderboard; - public int m_nScore; - public byte m_bScoreChanged; - public int m_nGlobalRankNew; - public int m_nGlobalRankPrevious; - } -} diff --git a/Src/SteamworksNET/LeaderboardScoresDownloaded_t.cs b/Src/SteamworksNET/LeaderboardScoresDownloaded_t.cs deleted file mode 100644 index 39d3d5ac..00000000 --- a/Src/SteamworksNET/LeaderboardScoresDownloaded_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LeaderboardScoresDownloaded_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1105)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LeaderboardScoresDownloaded_t - { - public const int k_iCallback = 1105; - public SteamLeaderboard_t m_hSteamLeaderboard; - public SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; - public int m_cEntryCount; - } -} diff --git a/Src/SteamworksNET/LeaderboardUGCSet_t.cs b/Src/SteamworksNET/LeaderboardUGCSet_t.cs deleted file mode 100644 index 016474f6..00000000 --- a/Src/SteamworksNET/LeaderboardUGCSet_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LeaderboardUGCSet_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1111)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LeaderboardUGCSet_t - { - public const int k_iCallback = 1111; - public EResult m_eResult; - public SteamLeaderboard_t m_hSteamLeaderboard; - } -} diff --git a/Src/SteamworksNET/LicensesUpdated_t.cs b/Src/SteamworksNET/LicensesUpdated_t.cs deleted file mode 100644 index 788a47e4..00000000 --- a/Src/SteamworksNET/LicensesUpdated_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LicensesUpdated_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(125)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct LicensesUpdated_t - { - public const int k_iCallback = 125; - } -} diff --git a/Src/SteamworksNET/LobbyChatMsg_t.cs b/Src/SteamworksNET/LobbyChatMsg_t.cs deleted file mode 100644 index 84683285..00000000 --- a/Src/SteamworksNET/LobbyChatMsg_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyChatMsg_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(507)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyChatMsg_t - { - public const int k_iCallback = 507; - public ulong m_ulSteamIDLobby; - public ulong m_ulSteamIDUser; - public byte m_eChatEntryType; - public uint m_iChatID; - } -} diff --git a/Src/SteamworksNET/LobbyChatUpdate_t.cs b/Src/SteamworksNET/LobbyChatUpdate_t.cs deleted file mode 100644 index a9372127..00000000 --- a/Src/SteamworksNET/LobbyChatUpdate_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyChatUpdate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(506)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyChatUpdate_t - { - public const int k_iCallback = 506; - public ulong m_ulSteamIDLobby; - public ulong m_ulSteamIDUserChanged; - public ulong m_ulSteamIDMakingChange; - public uint m_rgfChatMemberStateChange; - } -} diff --git a/Src/SteamworksNET/LobbyCreated_t.cs b/Src/SteamworksNET/LobbyCreated_t.cs deleted file mode 100644 index 10a12ad1..00000000 --- a/Src/SteamworksNET/LobbyCreated_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyCreated_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(513)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyCreated_t - { - public const int k_iCallback = 513; - public EResult m_eResult; - public ulong m_ulSteamIDLobby; - } -} diff --git a/Src/SteamworksNET/LobbyDataUpdate_t.cs b/Src/SteamworksNET/LobbyDataUpdate_t.cs deleted file mode 100644 index 210f04cc..00000000 --- a/Src/SteamworksNET/LobbyDataUpdate_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyDataUpdate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(505)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyDataUpdate_t - { - public const int k_iCallback = 505; - public ulong m_ulSteamIDLobby; - public ulong m_ulSteamIDMember; - public byte m_bSuccess; - } -} diff --git a/Src/SteamworksNET/LobbyEnter_t.cs b/Src/SteamworksNET/LobbyEnter_t.cs deleted file mode 100644 index e4c8c8cd..00000000 --- a/Src/SteamworksNET/LobbyEnter_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyEnter_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(504)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyEnter_t - { - public const int k_iCallback = 504; - public ulong m_ulSteamIDLobby; - public uint m_rgfChatPermissions; - [MarshalAs(UnmanagedType.I1)] - public bool m_bLocked; - public uint m_EChatRoomEnterResponse; - } -} diff --git a/Src/SteamworksNET/LobbyGameCreated_t.cs b/Src/SteamworksNET/LobbyGameCreated_t.cs deleted file mode 100644 index ccda0ddf..00000000 --- a/Src/SteamworksNET/LobbyGameCreated_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyGameCreated_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(509)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyGameCreated_t - { - public const int k_iCallback = 509; - public ulong m_ulSteamIDLobby; - public ulong m_ulSteamIDGameServer; - public uint m_unIP; - public ushort m_usPort; - } -} diff --git a/Src/SteamworksNET/LobbyInvite_t.cs b/Src/SteamworksNET/LobbyInvite_t.cs deleted file mode 100644 index 677a3e68..00000000 --- a/Src/SteamworksNET/LobbyInvite_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyInvite_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(503)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyInvite_t - { - public const int k_iCallback = 503; - public ulong m_ulSteamIDUser; - public ulong m_ulSteamIDLobby; - public ulong m_ulGameID; - } -} diff --git a/Src/SteamworksNET/LobbyKicked_t.cs b/Src/SteamworksNET/LobbyKicked_t.cs deleted file mode 100644 index fc1c9e96..00000000 --- a/Src/SteamworksNET/LobbyKicked_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyKicked_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(512)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyKicked_t - { - public const int k_iCallback = 512; - public ulong m_ulSteamIDLobby; - public ulong m_ulSteamIDAdmin; - public byte m_bKickedDueToDisconnect; - } -} diff --git a/Src/SteamworksNET/LobbyMatchList_t.cs b/Src/SteamworksNET/LobbyMatchList_t.cs deleted file mode 100644 index 557b1c98..00000000 --- a/Src/SteamworksNET/LobbyMatchList_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LobbyMatchList_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(510)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LobbyMatchList_t - { - public const int k_iCallback = 510; - public uint m_nLobbiesMatching; - } -} diff --git a/Src/SteamworksNET/LowBatteryPower_t.cs b/Src/SteamworksNET/LowBatteryPower_t.cs deleted file mode 100644 index cd2bb3c5..00000000 --- a/Src/SteamworksNET/LowBatteryPower_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.LowBatteryPower_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(702)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct LowBatteryPower_t - { - public const int k_iCallback = 702; - public byte m_nMinutesBatteryLeft; - } -} diff --git a/Src/SteamworksNET/MMKVPMarshaller.cs b/Src/SteamworksNET/MMKVPMarshaller.cs deleted file mode 100644 index c4115633..00000000 --- a/Src/SteamworksNET/MMKVPMarshaller.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MMKVPMarshaller -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public class MMKVPMarshaller - { - private IntPtr m_pNativeArray; - private IntPtr m_pArrayEntries; - - public MMKVPMarshaller(MatchMakingKeyValuePair_t[] filters) - { - if (filters == null) - return; - int num = Marshal.SizeOf(typeof (MatchMakingKeyValuePair_t)); - this.m_pNativeArray = Marshal.AllocHGlobal(Marshal.SizeOf(typeof (IntPtr)) * filters.Length); - this.m_pArrayEntries = Marshal.AllocHGlobal(num * filters.Length); - for (int index = 0; index < filters.Length; ++index) - Marshal.StructureToPtr((object) filters[index], new IntPtr(this.m_pArrayEntries.ToInt64() + (long) (index * num)), false); - Marshal.WriteIntPtr(this.m_pNativeArray, this.m_pArrayEntries); - } - - ~MMKVPMarshaller() - { - if (this.m_pArrayEntries != IntPtr.Zero) - Marshal.FreeHGlobal(this.m_pArrayEntries); - if (!(this.m_pNativeArray != IntPtr.Zero)) - return; - Marshal.FreeHGlobal(this.m_pNativeArray); - } - - public static implicit operator IntPtr(MMKVPMarshaller that) => that.m_pNativeArray; - } -} diff --git a/Src/SteamworksNET/ManifestId_t.cs b/Src/SteamworksNET/ManifestId_t.cs deleted file mode 100644 index 823de627..00000000 --- a/Src/SteamworksNET/ManifestId_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ManifestId_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ManifestId_t : IEquatable, IComparable - { - public static readonly ManifestId_t Invalid = new ManifestId_t(0UL); - public ulong m_ManifestId; - - public ManifestId_t(ulong value) => this.m_ManifestId = value; - - public override string ToString() => this.m_ManifestId.ToString(); - - public override bool Equals(object other) => other is ManifestId_t manifestIdT && this == manifestIdT; - - public override int GetHashCode() => this.m_ManifestId.GetHashCode(); - - public static bool operator ==(ManifestId_t x, ManifestId_t y) => (long) x.m_ManifestId == (long) y.m_ManifestId; - - public static bool operator !=(ManifestId_t x, ManifestId_t y) => !(x == y); - - public static explicit operator ManifestId_t(ulong value) => new ManifestId_t(value); - - public static explicit operator ulong(ManifestId_t that) => that.m_ManifestId; - - public bool Equals(ManifestId_t other) => (long) this.m_ManifestId == (long) other.m_ManifestId; - - public int CompareTo(ManifestId_t other) => this.m_ManifestId.CompareTo(other.m_ManifestId); - } -} diff --git a/Src/SteamworksNET/MatchMakingKeyValuePair_t.cs b/Src/SteamworksNET/MatchMakingKeyValuePair_t.cs deleted file mode 100644 index 1249cf16..00000000 --- a/Src/SteamworksNET/MatchMakingKeyValuePair_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MatchMakingKeyValuePair_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public struct MatchMakingKeyValuePair_t - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_szKey; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_szValue; - - private MatchMakingKeyValuePair_t(string strKey, string strValue) - { - this.m_szKey = strKey; - this.m_szValue = strValue; - } - } -} diff --git a/Src/SteamworksNET/MicroTxnAuthorizationResponse_t.cs b/Src/SteamworksNET/MicroTxnAuthorizationResponse_t.cs deleted file mode 100644 index e3882963..00000000 --- a/Src/SteamworksNET/MicroTxnAuthorizationResponse_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MicroTxnAuthorizationResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(152)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MicroTxnAuthorizationResponse_t - { - public const int k_iCallback = 152; - public uint m_unAppID; - public ulong m_ulOrderID; - public byte m_bAuthorized; - } -} diff --git a/Src/SteamworksNET/MusicPlayerRemoteToFront_t.cs b/Src/SteamworksNET/MusicPlayerRemoteToFront_t.cs deleted file mode 100644 index adb22470..00000000 --- a/Src/SteamworksNET/MusicPlayerRemoteToFront_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerRemoteToFront_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4103)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerRemoteToFront_t - { - public const int k_iCallback = 4103; - } -} diff --git a/Src/SteamworksNET/MusicPlayerRemoteWillActivate_t.cs b/Src/SteamworksNET/MusicPlayerRemoteWillActivate_t.cs deleted file mode 100644 index 4d204694..00000000 --- a/Src/SteamworksNET/MusicPlayerRemoteWillActivate_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerRemoteWillActivate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4101)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerRemoteWillActivate_t - { - public const int k_iCallback = 4101; - } -} diff --git a/Src/SteamworksNET/MusicPlayerRemoteWillDeactivate_t.cs b/Src/SteamworksNET/MusicPlayerRemoteWillDeactivate_t.cs deleted file mode 100644 index ee24eb22..00000000 --- a/Src/SteamworksNET/MusicPlayerRemoteWillDeactivate_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerRemoteWillDeactivate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4102)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerRemoteWillDeactivate_t - { - public const int k_iCallback = 4102; - } -} diff --git a/Src/SteamworksNET/MusicPlayerSelectsPlaylistEntry_t.cs b/Src/SteamworksNET/MusicPlayerSelectsPlaylistEntry_t.cs deleted file mode 100644 index 19dbc9f9..00000000 --- a/Src/SteamworksNET/MusicPlayerSelectsPlaylistEntry_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerSelectsPlaylistEntry_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4013)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MusicPlayerSelectsPlaylistEntry_t - { - public const int k_iCallback = 4013; - public int nID; - } -} diff --git a/Src/SteamworksNET/MusicPlayerSelectsQueueEntry_t.cs b/Src/SteamworksNET/MusicPlayerSelectsQueueEntry_t.cs deleted file mode 100644 index ffb3dffb..00000000 --- a/Src/SteamworksNET/MusicPlayerSelectsQueueEntry_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerSelectsQueueEntry_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4012)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MusicPlayerSelectsQueueEntry_t - { - public const int k_iCallback = 4012; - public int nID; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsLooped_t.cs b/Src/SteamworksNET/MusicPlayerWantsLooped_t.cs deleted file mode 100644 index c6f2d70f..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsLooped_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsLooped_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4110)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MusicPlayerWantsLooped_t - { - public const int k_iCallback = 4110; - [MarshalAs(UnmanagedType.I1)] - public bool m_bLooped; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsPause_t.cs b/Src/SteamworksNET/MusicPlayerWantsPause_t.cs deleted file mode 100644 index e0c4dcdc..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsPause_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsPause_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4106)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerWantsPause_t - { - public const int k_iCallback = 4106; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsPlayNext_t.cs b/Src/SteamworksNET/MusicPlayerWantsPlayNext_t.cs deleted file mode 100644 index 52c6570b..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsPlayNext_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsPlayNext_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4108)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerWantsPlayNext_t - { - public const int k_iCallback = 4108; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsPlayPrevious_t.cs b/Src/SteamworksNET/MusicPlayerWantsPlayPrevious_t.cs deleted file mode 100644 index 949ddff6..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsPlayPrevious_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsPlayPrevious_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4107)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerWantsPlayPrevious_t - { - public const int k_iCallback = 4107; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsPlay_t.cs b/Src/SteamworksNET/MusicPlayerWantsPlay_t.cs deleted file mode 100644 index c4a8f2c3..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsPlay_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsPlay_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4105)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerWantsPlay_t - { - public const int k_iCallback = 4105; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsPlayingRepeatStatus_t.cs b/Src/SteamworksNET/MusicPlayerWantsPlayingRepeatStatus_t.cs deleted file mode 100644 index bcc4c99f..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsPlayingRepeatStatus_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsPlayingRepeatStatus_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4114)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MusicPlayerWantsPlayingRepeatStatus_t - { - public const int k_iCallback = 4114; - public int m_nPlayingRepeatStatus; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsShuffled_t.cs b/Src/SteamworksNET/MusicPlayerWantsShuffled_t.cs deleted file mode 100644 index 95624812..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsShuffled_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsShuffled_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4109)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MusicPlayerWantsShuffled_t - { - public const int k_iCallback = 4109; - [MarshalAs(UnmanagedType.I1)] - public bool m_bShuffled; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWantsVolume_t.cs b/Src/SteamworksNET/MusicPlayerWantsVolume_t.cs deleted file mode 100644 index b204f745..00000000 --- a/Src/SteamworksNET/MusicPlayerWantsVolume_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWantsVolume_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4011)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct MusicPlayerWantsVolume_t - { - public const int k_iCallback = 4011; - public float m_flNewVolume; - } -} diff --git a/Src/SteamworksNET/MusicPlayerWillQuit_t.cs b/Src/SteamworksNET/MusicPlayerWillQuit_t.cs deleted file mode 100644 index e88d197e..00000000 --- a/Src/SteamworksNET/MusicPlayerWillQuit_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.MusicPlayerWillQuit_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4104)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct MusicPlayerWillQuit_t - { - public const int k_iCallback = 4104; - } -} diff --git a/Src/SteamworksNET/NET.csproj b/Src/SteamworksNET/NET.csproj deleted file mode 100644 index 8e402e3f..00000000 --- a/Src/SteamworksNET/NET.csproj +++ /dev/null @@ -1,389 +0,0 @@ - - - - - Debug - AnyCPU - {66C5215A-FC8B-48AA-AE10-4473F783FD31} - Library - Steamworks.NET - v4.0 - - 9.1.0.0 - 512 - Steamworks - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Src/SteamworksNET/NET.sln b/Src/SteamworksNET/NET.sln deleted file mode 100644 index d0d1e8a5..00000000 --- a/Src/SteamworksNET/NET.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steamworks.NET", "NET.csproj", "{66C5215A-FC8B-48AA-AE10-4473F783FD31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {66C5215A-FC8B-48AA-AE10-4473F783FD31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66C5215A-FC8B-48AA-AE10-4473F783FD31}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66C5215A-FC8B-48AA-AE10-4473F783FD31}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66C5215A-FC8B-48AA-AE10-4473F783FD31}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Src/SteamworksNET/NativeMethods.cs b/Src/SteamworksNET/NativeMethods.cs deleted file mode 100644 index cdfdc827..00000000 --- a/Src/SteamworksNET/NativeMethods.cs +++ /dev/null @@ -1,4451 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.NativeMethods -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; -using System.Security; - -namespace Steamworks -{ - [SuppressUnmanagedCodeSecurity] - internal static class NativeMethods - { - internal const string NativeLibraryName = "CSteamworks"; - internal const string NativeLibrary_SDKEncryptedAppTicket = "sdkencryptedappticket"; - - [DllImport("CSteamworks", EntryPoint = "Init", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamAPI_Init(); - - [DllImport("CSteamworks", EntryPoint = "Shutdown", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_Shutdown(); - - [DllImport("CSteamworks", EntryPoint = "RestartAppIfNecessary", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID); - - [DllImport("CSteamworks", EntryPoint = "ReleaseCurrentThreadMemory", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_ReleaseCurrentThreadMemory(); - - [DllImport("CSteamworks", EntryPoint = "WriteMiniDump", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_WriteMiniDump( - uint uStructuredExceptionCode, - IntPtr pvExceptionInfo, - uint uBuildID); - - [DllImport("CSteamworks", EntryPoint = "SetMiniDumpComment", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_SetMiniDumpComment(InteropHelp.UTF8StringHandle pchMsg); - - [DllImport("CSteamworks", EntryPoint = "RunCallbacks", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_RunCallbacks(); - - [DllImport("CSteamworks", EntryPoint = "RegisterCallback", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_RegisterCallback(IntPtr pCallback, int iCallback); - - [DllImport("CSteamworks", EntryPoint = "UnregisterCallback", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_UnregisterCallback(IntPtr pCallback); - - [DllImport("CSteamworks", EntryPoint = "RegisterCallResult", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_RegisterCallResult(IntPtr pCallback, ulong hAPICall); - - [DllImport("CSteamworks", EntryPoint = "UnregisterCallResult", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_UnregisterCallResult(IntPtr pCallback, ulong hAPICall); - - [DllImport("CSteamworks", EntryPoint = "IsSteamRunning", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamAPI_IsSteamRunning(); - - [DllImport("CSteamworks", EntryPoint = "Steam_RunCallbacks_", CallingConvention = CallingConvention.Cdecl)] - public static extern void Steam_RunCallbacks(HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.I1)] bool bGameServerCallbacks); - - [DllImport("CSteamworks", EntryPoint = "Steam_RegisterInterfaceFuncs_", CallingConvention = CallingConvention.Cdecl)] - public static extern void Steam_RegisterInterfaceFuncs(IntPtr hModule); - - [DllImport("CSteamworks", EntryPoint = "Steam_GetHSteamUserCurrent_", CallingConvention = CallingConvention.Cdecl)] - public static extern int Steam_GetHSteamUserCurrent(); - - [DllImport("CSteamworks", EntryPoint = "GetSteamInstallPath", CallingConvention = CallingConvention.Cdecl)] - public static extern int SteamAPI_GetSteamInstallPath(); - - [DllImport("CSteamworks", EntryPoint = "GetHSteamPipe_", CallingConvention = CallingConvention.Cdecl)] - public static extern int SteamAPI_GetHSteamPipe(); - - [DllImport("CSteamworks", EntryPoint = "SetTryCatchCallbacks", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_SetTryCatchCallbacks([MarshalAs(UnmanagedType.I1)] bool bTryCatchCallbacks); - - [DllImport("CSteamworks", EntryPoint = "GetHSteamUser_", CallingConvention = CallingConvention.Cdecl)] - public static extern int SteamAPI_GetHSteamUser(); - - [DllImport("CSteamworks", EntryPoint = "SteamInternal_CreateInterface_", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamInternal_CreateInterface(IntPtr ver); - - [DllImport("CSteamworks", EntryPoint = "UseBreakpadCrashHandler", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_UseBreakpadCrashHandler( - InteropHelp.UTF8StringHandle pchVersion, - InteropHelp.UTF8StringHandle pchDate, - InteropHelp.UTF8StringHandle pchTime, - [MarshalAs(UnmanagedType.I1)] bool bFullMemoryDumps, - IntPtr pvContext, - IntPtr m_pfnPreMinidumpCallback); - - [DllImport("CSteamworks", EntryPoint = "SetBreakpadAppID", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamAPI_SetBreakpadAppID(uint unAppID); - - [DllImport("CSteamworks", EntryPoint = "GameServer_Init", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamGameServer_Init( - uint unIP, - ushort usSteamPort, - ushort usGamePort, - ushort usQueryPort, - EServerMode eServerMode, - InteropHelp.UTF8StringHandle pchVersionString); - - [DllImport("CSteamworks", EntryPoint = "GameServer_Shutdown", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamGameServer_Shutdown(); - - [DllImport("CSteamworks", EntryPoint = "GameServer_RunCallbacks", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamGameServer_RunCallbacks(); - - [DllImport("CSteamworks", EntryPoint = "GameServer_ReleaseCurrentThreadMemory", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamGameServer_ReleaseCurrentThreadMemory(); - - [DllImport("CSteamworks", EntryPoint = "GameServer_BSecure", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamGameServer_BSecure(); - - [DllImport("CSteamworks", EntryPoint = "GameServer_GetSteamID", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong SteamGameServer_GetSteamID(); - - [DllImport("CSteamworks", EntryPoint = "GameServer_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl)] - public static extern int SteamGameServer_GetHSteamPipe(); - - [DllImport("CSteamworks", EntryPoint = "GameServer_GetHSteamUser", CallingConvention = CallingConvention.Cdecl)] - public static extern int SteamGameServer_GetHSteamUser(); - - [DllImport("CSteamworks", EntryPoint = "SteamInternal_GameServer_Init_", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamInternal_GameServer_Init( - uint unIP, - ushort usPort, - ushort usGamePort, - ushort usQueryPort, - EServerMode eServerMode, - InteropHelp.UTF8StringHandle pchVersionString); - - [DllImport("CSteamworks", EntryPoint = "SteamClient_", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr SteamClient(); - - [DllImport("CSteamworks", EntryPoint = "SteamGameServerClient_", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr SteamGameServerClient(); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamEncryptedAppTicket_BDecryptTicket( - byte[] rgubTicketEncrypted, - uint cubTicketEncrypted, - byte[] rgubTicketDecrypted, - ref uint pcubTicketDecrypted, - [MarshalAs(UnmanagedType.LPArray, SizeConst = 32)] byte[] rgubKey, - int cubKey); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamEncryptedAppTicket_BIsTicketForApp( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - AppId_t nAppID); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - public static extern uint SteamEncryptedAppTicket_GetTicketIssueTime( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - public static extern void SteamEncryptedAppTicket_GetTicketSteamID( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - out CSteamID psteamID); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - public static extern uint SteamEncryptedAppTicket_GetTicketAppID( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamEncryptedAppTicket_BUserOwnsAppInTicket( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - AppId_t nAppID); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool SteamEncryptedAppTicket_BUserIsVacBanned( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted); - - [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr SteamEncryptedAppTicket_GetUserVariableData( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - out uint pcubUserData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamAppList_GetNumInstalledApps(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamAppList_GetInstalledApps([In, Out] AppId_t[] pvecAppID, uint unMaxAppIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamAppList_GetAppName( - AppId_t nAppID, - IntPtr pchName, - int cchNameMax); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamAppList_GetAppInstallDir( - AppId_t nAppID, - IntPtr pchDirectory, - int cchNameMax); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamAppList_GetAppBuildId(AppId_t nAppID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsSubscribed(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsLowViolence(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsCybercafe(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsVACBanned(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamApps_GetCurrentGameLanguage(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamApps_GetAvailableGameLanguages(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsSubscribedApp(AppId_t appID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsDlcInstalled(AppId_t appID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamApps_GetEarliestPurchaseUnixTime(AppId_t nAppID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsSubscribedFromFreeWeekend(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamApps_GetDLCCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BGetDLCDataByIndex( - int iDLC, - out AppId_t pAppID, - out bool pbAvailable, - IntPtr pchName, - int cchNameBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamApps_InstallDLC(AppId_t nAppID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamApps_UninstallDLC(AppId_t nAppID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamApps_RequestAppProofOfPurchaseKey(AppId_t nAppID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_GetCurrentBetaName(IntPtr pchName, int cchNameBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_MarkContentCorrupt([MarshalAs(UnmanagedType.I1)] bool bMissingFilesOnly); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamApps_GetInstalledDepots( - AppId_t appID, - [In, Out] DepotId_t[] pvecDepots, - uint cMaxDepots); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamApps_GetAppInstallDir( - AppId_t appID, - IntPtr pchFolder, - uint cchFolderBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_BIsAppInstalled(AppId_t appID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamApps_GetAppOwner(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamApps_GetLaunchQueryParam(InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamApps_GetDlcDownloadProgress( - AppId_t nAppID, - out ulong punBytesDownloaded, - out ulong punBytesTotal); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamApps_GetAppBuildId(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamApps_RequestAllProofOfPurchaseKeys(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamApps_GetFileDetails(InteropHelp.UTF8StringHandle pszFileName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamClient_CreateSteamPipe(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamClient_BReleaseSteamPipe(HSteamPipe hSteamPipe); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamClient_ConnectToGlobalUser(HSteamPipe hSteamPipe); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamClient_CreateLocalUser( - out HSteamPipe phSteamPipe, - EAccountType eAccountType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamClient_ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamUser( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamGameServer( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamClient_SetLocalIPBinding(uint unIP, ushort usPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamFriends( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamUtils( - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamMatchmaking( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamMatchmakingServers( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamGenericInterface( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamUserStats( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamGameServerStats( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamApps( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamNetworking( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamRemoteStorage( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamScreenshots( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamClient_GetIPCCallCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamClient_SetWarningMessageHook( - SteamAPIWarningMessageHook_t pFunction); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamClient_BShutdownIfAllPipesClosed(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamHTTP( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamUnifiedMessages( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamController( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamUGC( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamAppList( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamMusic( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamMusicRemote( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamHTMLSurface( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamInventory( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamClient_GetISteamVideo( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - InteropHelp.UTF8StringHandle pchVersion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamController_Init(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamController_Shutdown(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_RunFrame(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamController_GetConnectedControllers( - [In, Out] ControllerHandle_t[] handlesOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamController_ShowBindingPanel(ControllerHandle_t controllerHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamController_GetActionSetHandle( - InteropHelp.UTF8StringHandle pszActionSetName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_ActivateActionSet( - ControllerHandle_t controllerHandle, - ControllerActionSetHandle_t actionSetHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamController_GetCurrentActionSet( - ControllerHandle_t controllerHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamController_GetDigitalActionHandle( - InteropHelp.UTF8StringHandle pszActionName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ControllerDigitalActionData_t ISteamController_GetDigitalActionData( - ControllerHandle_t controllerHandle, - ControllerDigitalActionHandle_t digitalActionHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamController_GetDigitalActionOrigins( - ControllerHandle_t controllerHandle, - ControllerActionSetHandle_t actionSetHandle, - ControllerDigitalActionHandle_t digitalActionHandle, - [In, Out] EControllerActionOrigin[] originsOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamController_GetAnalogActionHandle( - InteropHelp.UTF8StringHandle pszActionName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ControllerAnalogActionData_t ISteamController_GetAnalogActionData( - ControllerHandle_t controllerHandle, - ControllerAnalogActionHandle_t analogActionHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamController_GetAnalogActionOrigins( - ControllerHandle_t controllerHandle, - ControllerActionSetHandle_t actionSetHandle, - ControllerAnalogActionHandle_t analogActionHandle, - [In, Out] EControllerActionOrigin[] originsOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_StopAnalogActionMomentum( - ControllerHandle_t controllerHandle, - ControllerAnalogActionHandle_t eAction); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_TriggerHapticPulse( - ControllerHandle_t controllerHandle, - ESteamControllerPad eTargetPad, - ushort usDurationMicroSec); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_TriggerRepeatedHapticPulse( - ControllerHandle_t controllerHandle, - ESteamControllerPad eTargetPad, - ushort usDurationMicroSec, - ushort usOffMicroSec, - ushort unRepeat, - uint nFlags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_TriggerVibration( - ControllerHandle_t controllerHandle, - ushort usLeftSpeed, - ushort usRightSpeed); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamController_SetLEDColor( - ControllerHandle_t controllerHandle, - byte nColorR, - byte nColorG, - byte nColorB, - uint nFlags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamController_GetGamepadIndexForController( - ControllerHandle_t ulControllerHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamController_GetControllerForGamepadIndex(int nIndex); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ControllerMotionData_t ISteamController_GetMotionData( - ControllerHandle_t controllerHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamController_ShowDigitalActionOrigins( - ControllerHandle_t controllerHandle, - ControllerDigitalActionHandle_t digitalActionHandle, - float flScale, - float flXPosition, - float flYPosition); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamController_ShowAnalogActionOrigins( - ControllerHandle_t controllerHandle, - ControllerAnalogActionHandle_t analogActionHandle, - float flScale, - float flXPosition, - float flYPosition); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamController_GetStringForActionOrigin( - EControllerActionOrigin eOrigin); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamController_GetGlyphForActionOrigin( - EControllerActionOrigin eOrigin); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetPersonaName(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_SetPersonaName( - InteropHelp.UTF8StringHandle pchPersonaName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EPersonaState ISteamFriends_GetPersonaState(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendCount(EFriendFlags iFriendFlags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetFriendByIndex( - int iFriend, - EFriendFlags iFriendFlags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EFriendRelationship ISteamFriends_GetFriendRelationship( - CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EPersonaState ISteamFriends_GetFriendPersonaState(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetFriendPersonaName(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_GetFriendGamePlayed( - CSteamID steamIDFriend, - out FriendGameInfo_t pFriendGameInfo); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetFriendPersonaNameHistory( - CSteamID steamIDFriend, - int iPersonaName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendSteamLevel(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetPlayerNickname(CSteamID steamIDPlayer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendsGroupCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern short ISteamFriends_GetFriendsGroupIDByIndex(int iFG); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetFriendsGroupName(FriendsGroupID_t friendsGroupID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendsGroupMembersCount( - FriendsGroupID_t friendsGroupID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_GetFriendsGroupMembersList( - FriendsGroupID_t friendsGroupID, - [In, Out] CSteamID[] pOutSteamIDMembers, - int nMembersCount); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_HasFriend( - CSteamID steamIDFriend, - EFriendFlags iFriendFlags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetClanCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetClanByIndex(int iClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetClanName(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetClanTag(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_GetClanActivityCounts( - CSteamID steamIDClan, - out int pnOnline, - out int pnInGame, - out int pnChatting); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_DownloadClanActivityCounts( - [In, Out] CSteamID[] psteamIDClans, - int cClansToRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendCountFromSource(CSteamID steamIDSource); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetFriendFromSourceByIndex( - CSteamID steamIDSource, - int iFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_IsUserInSource( - CSteamID steamIDUser, - CSteamID steamIDSource); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_SetInGameVoiceSpeaking( - CSteamID steamIDUser, - [MarshalAs(UnmanagedType.I1)] bool bSpeaking); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_ActivateGameOverlay( - InteropHelp.UTF8StringHandle pchDialog); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_ActivateGameOverlayToUser( - InteropHelp.UTF8StringHandle pchDialog, - CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_ActivateGameOverlayToWebPage( - InteropHelp.UTF8StringHandle pchURL); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_ActivateGameOverlayToStore( - AppId_t nAppID, - EOverlayToStoreFlag eFlag); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_SetPlayedWith(CSteamID steamIDUserPlayedWith); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_ActivateGameOverlayInviteDialog(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetSmallFriendAvatar(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetMediumFriendAvatar(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetLargeFriendAvatar(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_RequestUserInformation( - CSteamID steamIDUser, - [MarshalAs(UnmanagedType.I1)] bool bRequireNameOnly); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_RequestClanOfficerList(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetClanOwner(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetClanOfficerCount(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetClanOfficerByIndex( - CSteamID steamIDClan, - int iOfficer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamFriends_GetUserRestrictions(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_SetRichPresence( - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_ClearRichPresence(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetFriendRichPresence( - CSteamID steamIDFriend, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendRichPresenceKeyCount(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamFriends_GetFriendRichPresenceKeyByIndex( - CSteamID steamIDFriend, - int iKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamFriends_RequestFriendRichPresence(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_InviteUserToGame( - CSteamID steamIDFriend, - InteropHelp.UTF8StringHandle pchConnectString); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetCoplayFriendCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetCoplayFriend(int iCoplayFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendCoplayTime(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamFriends_GetFriendCoplayGame(CSteamID steamIDFriend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_JoinClanChatRoom(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_LeaveClanChatRoom(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetClanChatMemberCount(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetChatMemberByIndex(CSteamID steamIDClan, int iUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_SendClanChatMessage( - CSteamID steamIDClanChat, - InteropHelp.UTF8StringHandle pchText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetClanChatMessage( - CSteamID steamIDClanChat, - int iMessage, - IntPtr prgchText, - int cchTextMax, - out EChatEntryType peChatEntryType, - out CSteamID psteamidChatter); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_IsClanChatAdmin( - CSteamID steamIDClanChat, - CSteamID steamIDUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_OpenClanChatWindowInSteam(CSteamID steamIDClanChat); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_CloseClanChatWindowInSteam(CSteamID steamIDClanChat); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_SetListenForFriendsMessages([MarshalAs(UnmanagedType.I1)] bool bInterceptEnabled); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamFriends_ReplyToFriendMessage( - CSteamID steamIDFriend, - InteropHelp.UTF8StringHandle pchMsgToSend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamFriends_GetFriendMessage( - CSteamID steamIDFriend, - int iMessageID, - IntPtr pvData, - int cubData, - out EChatEntryType peChatEntryType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_GetFollowerCount(CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_IsFollowing(CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamFriends_EnumerateFollowingList(uint unStartIndex); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_InitGameServer( - uint unIP, - ushort usGamePort, - ushort usQueryPort, - uint unFlags, - AppId_t nGameAppId, - InteropHelp.UTF8StringHandle pchVersionString); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetProduct(InteropHelp.UTF8StringHandle pszProduct); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetGameDescription( - InteropHelp.UTF8StringHandle pszGameDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetModDir(InteropHelp.UTF8StringHandle pszModDir); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetDedicatedServer([MarshalAs(UnmanagedType.I1)] bool bDedicated); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_LogOn(InteropHelp.UTF8StringHandle pszToken); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_LogOnAnonymous(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_LogOff(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_BLoggedOn(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_BSecure(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServer_GetSteamID(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_WasRestartRequested(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetMaxPlayerCount(int cPlayersMax); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetBotPlayerCount(int cBotplayers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetServerName( - InteropHelp.UTF8StringHandle pszServerName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetMapName(InteropHelp.UTF8StringHandle pszMapName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetPasswordProtected([MarshalAs(UnmanagedType.I1)] bool bPasswordProtected); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetSpectatorPort(ushort unSpectatorPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetSpectatorServerName( - InteropHelp.UTF8StringHandle pszSpectatorServerName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_ClearAllKeyValues(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetKeyValue( - InteropHelp.UTF8StringHandle pKey, - InteropHelp.UTF8StringHandle pValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetGameTags(InteropHelp.UTF8StringHandle pchGameTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetGameData(InteropHelp.UTF8StringHandle pchGameData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetRegion(InteropHelp.UTF8StringHandle pszRegion); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_SendUserConnectAndAuthenticate( - uint unIPClient, - byte[] pvAuthBlob, - uint cubAuthBlobSize, - out CSteamID pSteamIDUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServer_CreateUnauthenticatedUserConnection(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SendUserDisconnect(CSteamID steamIDUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_BUpdateUserData( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchPlayerName, - uint uScore); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServer_GetAuthSessionTicket( - byte[] pTicket, - int cbMaxTicket, - out uint pcbTicket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EBeginAuthSessionResult ISteamGameServer_BeginAuthSession( - byte[] pAuthTicket, - int cbAuthTicket, - CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_EndAuthSession(CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_CancelAuthTicket(HAuthTicket hAuthTicket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EUserHasLicenseForAppResult ISteamGameServer_UserHasLicenseForApp( - CSteamID steamID, - AppId_t appID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_RequestUserGroupStatus( - CSteamID steamIDUser, - CSteamID steamIDGroup); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_GetGameplayStats(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServer_GetServerReputation(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServer_GetPublicIP(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServer_HandleIncomingPacket( - byte[] pData, - int cbData, - uint srcIP, - ushort srcPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamGameServer_GetNextOutgoingPacket( - byte[] pOut, - int cbMaxOut, - out uint pNetAdr, - out ushort pPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_EnableHeartbeats([MarshalAs(UnmanagedType.I1)] bool bActive); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_SetHeartbeatInterval(int iHeartbeatInterval); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServer_ForceHeartbeat(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServer_AssociateWithClan(CSteamID steamIDClan); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServer_ComputeNewPlayerCompatibility( - CSteamID steamIDNewPlayer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerStats_RequestUserStats(CSteamID steamIDUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_GetUserStat( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out int pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_GetUserStat_( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out float pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_GetUserAchievement( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out bool pbAchieved); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_SetUserStat( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - int nData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_SetUserStat_( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - float fData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_UpdateUserAvgRateStat( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - float flCountThisSession, - double dSessionLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_SetUserAchievement( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerStats_ClearUserAchievement( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerStats_StoreUserStats(CSteamID steamIDUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTMLSurface_Init(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTMLSurface_Shutdown(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamHTMLSurface_CreateBrowser( - InteropHelp.UTF8StringHandle pchUserAgent, - InteropHelp.UTF8StringHandle pchUserCSS); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_RemoveBrowser(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_LoadURL( - HHTMLBrowser unBrowserHandle, - InteropHelp.UTF8StringHandle pchURL, - InteropHelp.UTF8StringHandle pchPostData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetSize( - HHTMLBrowser unBrowserHandle, - uint unWidth, - uint unHeight); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_StopLoad(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_Reload(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_GoBack(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_GoForward(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_AddHeader( - HHTMLBrowser unBrowserHandle, - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_ExecuteJavascript( - HHTMLBrowser unBrowserHandle, - InteropHelp.UTF8StringHandle pchScript); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_MouseUp( - HHTMLBrowser unBrowserHandle, - EHTMLMouseButton eMouseButton); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_MouseDown( - HHTMLBrowser unBrowserHandle, - EHTMLMouseButton eMouseButton); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_MouseDoubleClick( - HHTMLBrowser unBrowserHandle, - EHTMLMouseButton eMouseButton); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_MouseMove( - HHTMLBrowser unBrowserHandle, - int x, - int y); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_MouseWheel(HHTMLBrowser unBrowserHandle, int nDelta); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_KeyDown( - HHTMLBrowser unBrowserHandle, - uint nNativeKeyCode, - EHTMLKeyModifiers eHTMLKeyModifiers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_KeyUp( - HHTMLBrowser unBrowserHandle, - uint nNativeKeyCode, - EHTMLKeyModifiers eHTMLKeyModifiers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_KeyChar( - HHTMLBrowser unBrowserHandle, - uint cUnicodeChar, - EHTMLKeyModifiers eHTMLKeyModifiers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetHorizontalScroll( - HHTMLBrowser unBrowserHandle, - uint nAbsolutePixelScroll); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetVerticalScroll( - HHTMLBrowser unBrowserHandle, - uint nAbsolutePixelScroll); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetKeyFocus( - HHTMLBrowser unBrowserHandle, - [MarshalAs(UnmanagedType.I1)] bool bHasKeyFocus); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_ViewSource(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_CopyToClipboard(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_PasteFromClipboard(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_Find( - HHTMLBrowser unBrowserHandle, - InteropHelp.UTF8StringHandle pchSearchStr, - [MarshalAs(UnmanagedType.I1)] bool bCurrentlyInFind, - [MarshalAs(UnmanagedType.I1)] bool bReverse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_StopFind(HHTMLBrowser unBrowserHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_GetLinkAtPosition( - HHTMLBrowser unBrowserHandle, - int x, - int y); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetCookie( - InteropHelp.UTF8StringHandle pchHostname, - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue, - InteropHelp.UTF8StringHandle pchPath, - uint nExpires, - [MarshalAs(UnmanagedType.I1)] bool bSecure, - [MarshalAs(UnmanagedType.I1)] bool bHTTPOnly); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetPageScaleFactor( - HHTMLBrowser unBrowserHandle, - float flZoom, - int nPointX, - int nPointY); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_SetBackgroundMode( - HHTMLBrowser unBrowserHandle, - [MarshalAs(UnmanagedType.I1)] bool bBackgroundMode); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_AllowStartRequest( - HHTMLBrowser unBrowserHandle, - [MarshalAs(UnmanagedType.I1)] bool bAllowed); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_JSDialogResponse( - HHTMLBrowser unBrowserHandle, - [MarshalAs(UnmanagedType.I1)] bool bResult); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamHTMLSurface_FileLoadDialogResponse( - HHTMLBrowser unBrowserHandle, - IntPtr pchSelectedFiles); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamHTTP_CreateHTTPRequest( - EHTTPMethod eHTTPRequestMethod, - InteropHelp.UTF8StringHandle pchAbsoluteURL); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestContextValue( - HTTPRequestHandle hRequest, - ulong ulContextValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestNetworkActivityTimeout( - HTTPRequestHandle hRequest, - uint unTimeoutSeconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestHeaderValue( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchHeaderName, - InteropHelp.UTF8StringHandle pchHeaderValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestGetOrPostParameter( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchParamName, - InteropHelp.UTF8StringHandle pchParamValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SendHTTPRequest( - HTTPRequestHandle hRequest, - out SteamAPICall_t pCallHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SendHTTPRequestAndStreamResponse( - HTTPRequestHandle hRequest, - out SteamAPICall_t pCallHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_DeferHTTPRequest(HTTPRequestHandle hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_PrioritizeHTTPRequest(HTTPRequestHandle hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPResponseHeaderSize( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchHeaderName, - out uint unResponseHeaderSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPResponseHeaderValue( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchHeaderName, - byte[] pHeaderValueBuffer, - uint unBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPResponseBodySize( - HTTPRequestHandle hRequest, - out uint unBodySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPResponseBodyData( - HTTPRequestHandle hRequest, - byte[] pBodyDataBuffer, - uint unBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPStreamingResponseBodyData( - HTTPRequestHandle hRequest, - uint cOffset, - byte[] pBodyDataBuffer, - uint unBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_ReleaseHTTPRequest(HTTPRequestHandle hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPDownloadProgressPct( - HTTPRequestHandle hRequest, - out float pflPercentOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestRawPostBody( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchContentType, - byte[] pubBody, - uint unBodyLen); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamHTTP_CreateCookieContainer([MarshalAs(UnmanagedType.I1)] bool bAllowResponsesToModify); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_ReleaseCookieContainer( - HTTPCookieContainerHandle hCookieContainer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetCookie( - HTTPCookieContainerHandle hCookieContainer, - InteropHelp.UTF8StringHandle pchHost, - InteropHelp.UTF8StringHandle pchUrl, - InteropHelp.UTF8StringHandle pchCookie); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestCookieContainer( - HTTPRequestHandle hRequest, - HTTPCookieContainerHandle hCookieContainer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestUserAgentInfo( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchUserAgentInfo); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate( - HTTPRequestHandle hRequest, - [MarshalAs(UnmanagedType.I1)] bool bRequireVerifiedCertificate); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( - HTTPRequestHandle hRequest, - uint unMilliseconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamHTTP_GetHTTPRequestWasTimedOut( - HTTPRequestHandle hRequest, - out bool pbWasTimedOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EResult ISteamInventory_GetResultStatus(SteamInventoryResult_t resultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GetResultItems( - SteamInventoryResult_t resultHandle, - [In, Out] SteamItemDetails_t[] pOutItemsArray, - ref uint punOutItemsArraySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamInventory_GetResultTimestamp(SteamInventoryResult_t resultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_CheckResultSteamID( - SteamInventoryResult_t resultHandle, - CSteamID steamIDExpected); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamInventory_DestroyResult(SteamInventoryResult_t resultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GetAllItems(out SteamInventoryResult_t pResultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GetItemsByID( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemInstanceID_t[] pInstanceIDs, - uint unCountInstanceIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_SerializeResult( - SteamInventoryResult_t resultHandle, - byte[] pOutBuffer, - out uint punOutBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_DeserializeResult( - out SteamInventoryResult_t pOutResultHandle, - byte[] pBuffer, - uint unBufferSize, - [MarshalAs(UnmanagedType.I1)] bool bRESERVED_MUST_BE_FALSE); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GenerateItems( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemDef_t[] pArrayItemDefs, - [In, Out] uint[] punArrayQuantity, - uint unArrayLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GrantPromoItems( - out SteamInventoryResult_t pResultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_AddPromoItem( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t itemDef); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_AddPromoItems( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemDef_t[] pArrayItemDefs, - uint unArrayLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_ConsumeItem( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemConsume, - uint unQuantity); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_ExchangeItems( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemDef_t[] pArrayGenerate, - [In, Out] uint[] punArrayGenerateQuantity, - uint unArrayGenerateLength, - [In, Out] SteamItemInstanceID_t[] pArrayDestroy, - [In, Out] uint[] punArrayDestroyQuantity, - uint unArrayDestroyLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_TransferItemQuantity( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemIdSource, - uint unQuantity, - SteamItemInstanceID_t itemIdDest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamInventory_SendItemDropHeartbeat(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_TriggerItemDrop( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t dropListDefinition); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_TradeItems( - out SteamInventoryResult_t pResultHandle, - CSteamID steamIDTradePartner, - [In, Out] SteamItemInstanceID_t[] pArrayGive, - [In, Out] uint[] pArrayGiveQuantity, - uint nArrayGiveLength, - [In, Out] SteamItemInstanceID_t[] pArrayGet, - [In, Out] uint[] pArrayGetQuantity, - uint nArrayGetLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_LoadItemDefinitions(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GetItemDefinitionIDs( - [In, Out] SteamItemDef_t[] pItemDefIDs, - out uint punItemDefIDsArraySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GetItemDefinitionProperty( - SteamItemDef_t iDefinition, - InteropHelp.UTF8StringHandle pchPropertyName, - IntPtr pchValueBuffer, - ref uint punValueBufferSizeOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamInventory_RequestEligiblePromoItemDefinitionsIDs( - CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamInventory_GetEligiblePromoItemDefinitionIDs( - CSteamID steamID, - [In, Out] SteamItemDef_t[] pItemDefIDs, - ref uint punItemDefIDsArraySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmaking_GetFavoriteGameCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_GetFavoriteGame( - int iGame, - out AppId_t pnAppID, - out uint pnIP, - out ushort pnConnPort, - out ushort pnQueryPort, - out uint punFlags, - out uint pRTime32LastPlayedOnServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmaking_AddFavoriteGame( - AppId_t nAppID, - uint nIP, - ushort nConnPort, - ushort nQueryPort, - uint unFlags, - uint rTime32LastPlayedOnServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_RemoveFavoriteGame( - AppId_t nAppID, - uint nIP, - ushort nConnPort, - ushort nQueryPort, - uint unFlags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamMatchmaking_RequestLobbyList(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListStringFilter( - InteropHelp.UTF8StringHandle pchKeyToMatch, - InteropHelp.UTF8StringHandle pchValueToMatch, - ELobbyComparison eComparisonType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListNumericalFilter( - InteropHelp.UTF8StringHandle pchKeyToMatch, - int nValueToMatch, - ELobbyComparison eComparisonType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListNearValueFilter( - InteropHelp.UTF8StringHandle pchKeyToMatch, - int nValueToBeCloseTo); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable( - int nSlotsAvailable); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListDistanceFilter( - ELobbyDistanceFilter eLobbyDistanceFilter); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListResultCountFilter(int cMaxResults); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter( - CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamMatchmaking_GetLobbyByIndex(int iLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamMatchmaking_CreateLobby(ELobbyType eLobbyType, int cMaxMembers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamMatchmaking_JoinLobby(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_LeaveLobby(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_InviteUserToLobby( - CSteamID steamIDLobby, - CSteamID steamIDInvitee); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmaking_GetNumLobbyMembers(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamMatchmaking_GetLobbyMemberByIndex( - CSteamID steamIDLobby, - int iMember); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmaking_GetLobbyData( - CSteamID steamIDLobby, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SetLobbyData( - CSteamID steamIDLobby, - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmaking_GetLobbyDataCount(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_GetLobbyDataByIndex( - CSteamID steamIDLobby, - int iLobbyData, - IntPtr pchKey, - int cchKeyBufferSize, - IntPtr pchValue, - int cchValueBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_DeleteLobbyData( - CSteamID steamIDLobby, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmaking_GetLobbyMemberData( - CSteamID steamIDLobby, - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_SetLobbyMemberData( - CSteamID steamIDLobby, - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SendLobbyChatMsg( - CSteamID steamIDLobby, - byte[] pvMsgBody, - int cubMsgBody); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmaking_GetLobbyChatEntry( - CSteamID steamIDLobby, - int iChatID, - out CSteamID pSteamIDUser, - byte[] pvData, - int cubData, - out EChatEntryType peChatEntryType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_RequestLobbyData(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmaking_SetLobbyGameServer( - CSteamID steamIDLobby, - uint unGameServerIP, - ushort unGameServerPort, - CSteamID steamIDGameServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_GetLobbyGameServer( - CSteamID steamIDLobby, - out uint punGameServerIP, - out ushort punGameServerPort, - out CSteamID psteamIDGameServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SetLobbyMemberLimit( - CSteamID steamIDLobby, - int cMaxMembers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmaking_GetLobbyMemberLimit(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SetLobbyType( - CSteamID steamIDLobby, - ELobbyType eLobbyType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SetLobbyJoinable( - CSteamID steamIDLobby, - [MarshalAs(UnmanagedType.I1)] bool bLobbyJoinable); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamMatchmaking_GetLobbyOwner(CSteamID steamIDLobby); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SetLobbyOwner( - CSteamID steamIDLobby, - CSteamID steamIDNewOwner); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmaking_SetLinkedLobby( - CSteamID steamIDLobby, - CSteamID steamIDLobbyDependent); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_RequestInternetServerList( - AppId_t iApp, - IntPtr ppchFilters, - uint nFilters, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_RequestLANServerList( - AppId_t iApp, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_RequestFriendsServerList( - AppId_t iApp, - IntPtr ppchFilters, - uint nFilters, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_RequestFavoritesServerList( - AppId_t iApp, - IntPtr ppchFilters, - uint nFilters, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_RequestHistoryServerList( - AppId_t iApp, - IntPtr ppchFilters, - uint nFilters, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_RequestSpectatorServerList( - AppId_t iApp, - IntPtr ppchFilters, - uint nFilters, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmakingServers_ReleaseRequest( - HServerListRequest hServerListRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamMatchmakingServers_GetServerDetails( - HServerListRequest hRequest, - int iServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmakingServers_CancelQuery(HServerListRequest hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmakingServers_RefreshQuery(HServerListRequest hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMatchmakingServers_IsRefreshing(HServerListRequest hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmakingServers_GetServerCount(HServerListRequest hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmakingServers_RefreshServer( - HServerListRequest hRequest, - int iServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmakingServers_PingServer( - uint unIP, - ushort usPort, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmakingServers_PlayerDetails( - uint unIP, - ushort usPort, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamMatchmakingServers_ServerRules( - uint unIP, - ushort usPort, - IntPtr pRequestServersResponse); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMatchmakingServers_CancelServerQuery(HServerQuery hServerQuery); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusic_BIsEnabled(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusic_BIsPlaying(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern AudioPlayback_Status ISteamMusic_GetPlaybackStatus(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMusic_Play(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMusic_Pause(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMusic_PlayPrevious(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMusic_PlayNext(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamMusic_SetVolume(float flVolume); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern float ISteamMusic_GetVolume(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_RegisterSteamMusicRemote( - InteropHelp.UTF8StringHandle pchName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_DeregisterSteamMusicRemote(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_BIsCurrentMusicRemote(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_BActivationSuccess([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_SetDisplayName( - InteropHelp.UTF8StringHandle pchDisplayName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_SetPNGIcon_64x64( - byte[] pvBuffer, - uint cbBufferLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_EnablePlayPrevious([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_EnablePlayNext([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_EnableShuffled([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_EnableLooped([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_EnableQueue([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_EnablePlaylists([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdatePlaybackStatus(AudioPlayback_Status nStatus); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdateShuffled([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdateLooped([MarshalAs(UnmanagedType.I1)] bool bValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdateVolume(float flValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_CurrentEntryWillChange(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_CurrentEntryIsAvailable([MarshalAs(UnmanagedType.I1)] bool bAvailable); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdateCurrentEntryText( - InteropHelp.UTF8StringHandle pchText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds(int nValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_UpdateCurrentEntryCoverArt( - byte[] pvBuffer, - uint cbBufferLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_CurrentEntryDidChange(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_QueueWillChange(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_ResetQueueEntries(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_SetQueueEntry( - int nID, - int nPosition, - InteropHelp.UTF8StringHandle pchEntryText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_SetCurrentQueueEntry(int nID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_QueueDidChange(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_PlaylistWillChange(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_ResetPlaylistEntries(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_SetPlaylistEntry( - int nID, - int nPosition, - InteropHelp.UTF8StringHandle pchEntryText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_SetCurrentPlaylistEntry(int nID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamMusicRemote_PlaylistDidChange(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_SendP2PPacket( - CSteamID steamIDRemote, - byte[] pubData, - uint cubData, - EP2PSend eP2PSendType, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_IsP2PPacketAvailable( - out uint pcubMsgSize, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_ReadP2PPacket( - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out CSteamID psteamIDRemote, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_AcceptP2PSessionWithUser(CSteamID steamIDRemote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_CloseP2PSessionWithUser(CSteamID steamIDRemote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_CloseP2PChannelWithUser( - CSteamID steamIDRemote, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_GetP2PSessionState( - CSteamID steamIDRemote, - out P2PSessionState_t pConnectionState); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_AllowP2PPacketRelay([MarshalAs(UnmanagedType.I1)] bool bAllow); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamNetworking_CreateListenSocket( - int nVirtualP2PPort, - uint nIP, - ushort nPort, - [MarshalAs(UnmanagedType.I1)] bool bAllowUseOfPacketRelay); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamNetworking_CreateP2PConnectionSocket( - CSteamID steamIDTarget, - int nVirtualPort, - int nTimeoutSec, - [MarshalAs(UnmanagedType.I1)] bool bAllowUseOfPacketRelay); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamNetworking_CreateConnectionSocket( - uint nIP, - ushort nPort, - int nTimeoutSec); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_DestroySocket( - SNetSocket_t hSocket, - [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_DestroyListenSocket( - SNetListenSocket_t hSocket, - [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_SendDataOnSocket( - SNetSocket_t hSocket, - byte[] pubData, - uint cubData, - [MarshalAs(UnmanagedType.I1)] bool bReliable); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_IsDataAvailableOnSocket( - SNetSocket_t hSocket, - out uint pcubMsgSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_RetrieveDataFromSocket( - SNetSocket_t hSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_IsDataAvailable( - SNetListenSocket_t hListenSocket, - out uint pcubMsgSize, - out SNetSocket_t phSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_RetrieveData( - SNetListenSocket_t hListenSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out SNetSocket_t phSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_GetSocketInfo( - SNetSocket_t hSocket, - out CSteamID pSteamIDRemote, - out int peSocketStatus, - out uint punIPRemote, - out ushort punPortRemote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamNetworking_GetListenSocketInfo( - SNetListenSocket_t hListenSocket, - out uint pnIP, - out ushort pnPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ESNetSocketConnectionType ISteamNetworking_GetSocketConnectionType( - SNetSocket_t hSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamNetworking_GetMaxPacketSize(SNetSocket_t hSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileWrite( - InteropHelp.UTF8StringHandle pchFile, - byte[] pvData, - int cubData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamRemoteStorage_FileRead( - InteropHelp.UTF8StringHandle pchFile, - byte[] pvData, - int cubDataToRead); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_FileWriteAsync( - InteropHelp.UTF8StringHandle pchFile, - byte[] pvData, - uint cubData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_FileReadAsync( - InteropHelp.UTF8StringHandle pchFile, - uint nOffset, - uint cubToRead); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileReadAsyncComplete( - SteamAPICall_t hReadCall, - byte[] pvBuffer, - uint cubToRead); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileForget(InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileDelete(InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_FileShare(InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_SetSyncPlatforms( - InteropHelp.UTF8StringHandle pchFile, - ERemoteStoragePlatform eRemoteStoragePlatform); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_FileWriteStreamOpen( - InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileWriteStreamWriteChunk( - UGCFileWriteStreamHandle_t writeHandle, - byte[] pvData, - int cubData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileWriteStreamClose( - UGCFileWriteStreamHandle_t writeHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileWriteStreamCancel( - UGCFileWriteStreamHandle_t writeHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FileExists(InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_FilePersisted(InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamRemoteStorage_GetFileSize(InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern long ISteamRemoteStorage_GetFileTimestamp( - InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ERemoteStoragePlatform ISteamRemoteStorage_GetSyncPlatforms( - InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamRemoteStorage_GetFileCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamRemoteStorage_GetFileNameAndSize( - int iFile, - out int pnFileSizeInBytes); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_GetQuota( - out ulong pnTotalBytes, - out ulong puAvailableBytes); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_IsCloudEnabledForAccount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_IsCloudEnabledForApp(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamRemoteStorage_SetCloudEnabledForApp([MarshalAs(UnmanagedType.I1)] bool bEnabled); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_UGCDownload( - UGCHandle_t hContent, - uint unPriority); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_GetUGCDownloadProgress( - UGCHandle_t hContent, - out int pnBytesDownloaded, - out int pnBytesExpected); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_GetUGCDetails( - UGCHandle_t hContent, - out AppId_t pnAppID, - out IntPtr ppchName, - out int pnFileSizeInBytes, - out CSteamID pSteamIDOwner); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamRemoteStorage_UGCRead( - UGCHandle_t hContent, - byte[] pvData, - int cubDataToRead, - uint cOffset, - EUGCReadAction eAction); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamRemoteStorage_GetCachedUGCCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_GetCachedUGCHandle(int iCachedContent); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_PublishWorkshopFile( - InteropHelp.UTF8StringHandle pchFile, - InteropHelp.UTF8StringHandle pchPreviewFile, - AppId_t nConsumerAppId, - InteropHelp.UTF8StringHandle pchTitle, - InteropHelp.UTF8StringHandle pchDescription, - ERemoteStoragePublishedFileVisibility eVisibility, - IntPtr pTags, - EWorkshopFileType eWorkshopFileType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_CreatePublishedFileUpdateRequest( - PublishedFileId_t unPublishedFileId); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFileFile( - PublishedFileUpdateHandle_t updateHandle, - InteropHelp.UTF8StringHandle pchFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFilePreviewFile( - PublishedFileUpdateHandle_t updateHandle, - InteropHelp.UTF8StringHandle pchPreviewFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFileTitle( - PublishedFileUpdateHandle_t updateHandle, - InteropHelp.UTF8StringHandle pchTitle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFileDescription( - PublishedFileUpdateHandle_t updateHandle, - InteropHelp.UTF8StringHandle pchDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFileVisibility( - PublishedFileUpdateHandle_t updateHandle, - ERemoteStoragePublishedFileVisibility eVisibility); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFileTags( - PublishedFileUpdateHandle_t updateHandle, - IntPtr pTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_CommitPublishedFileUpdate( - PublishedFileUpdateHandle_t updateHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_GetPublishedFileDetails( - PublishedFileId_t unPublishedFileId, - uint unMaxSecondsOld); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_DeletePublishedFile( - PublishedFileId_t unPublishedFileId); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_EnumerateUserPublishedFiles(uint unStartIndex); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_SubscribePublishedFile( - PublishedFileId_t unPublishedFileId); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_EnumerateUserSubscribedFiles(uint unStartIndex); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_UnsubscribePublishedFile( - PublishedFileId_t unPublishedFileId); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription( - PublishedFileUpdateHandle_t updateHandle, - InteropHelp.UTF8StringHandle pchChangeDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_GetPublishedItemVoteDetails( - PublishedFileId_t unPublishedFileId); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_UpdateUserPublishedItemVote( - PublishedFileId_t unPublishedFileId, - [MarshalAs(UnmanagedType.I1)] bool bVoteUp); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_GetUserPublishedItemVoteDetails( - PublishedFileId_t unPublishedFileId); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles( - CSteamID steamId, - uint unStartIndex, - IntPtr pRequiredTags, - IntPtr pExcludedTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_PublishVideo( - EWorkshopVideoProvider eVideoProvider, - InteropHelp.UTF8StringHandle pchVideoAccount, - InteropHelp.UTF8StringHandle pchVideoIdentifier, - InteropHelp.UTF8StringHandle pchPreviewFile, - AppId_t nConsumerAppId, - InteropHelp.UTF8StringHandle pchTitle, - InteropHelp.UTF8StringHandle pchDescription, - ERemoteStoragePublishedFileVisibility eVisibility, - IntPtr pTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_SetUserPublishedFileAction( - PublishedFileId_t unPublishedFileId, - EWorkshopFileAction eAction); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_EnumeratePublishedFilesByUserAction( - EWorkshopFileAction eAction, - uint unStartIndex); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_EnumeratePublishedWorkshopFiles( - EWorkshopEnumerationType eEnumerationType, - uint unStartIndex, - uint unCount, - uint unDays, - IntPtr pTags, - IntPtr pUserTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamRemoteStorage_UGCDownloadToLocation( - UGCHandle_t hContent, - InteropHelp.UTF8StringHandle pchLocation, - uint unPriority); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamScreenshots_WriteScreenshot( - byte[] pubRGB, - uint cubRGB, - int nWidth, - int nHeight); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamScreenshots_AddScreenshotToLibrary( - InteropHelp.UTF8StringHandle pchFilename, - InteropHelp.UTF8StringHandle pchThumbnailFilename, - int nWidth, - int nHeight); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamScreenshots_TriggerScreenshot(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamScreenshots_HookScreenshots([MarshalAs(UnmanagedType.I1)] bool bHook); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamScreenshots_SetLocation( - ScreenshotHandle hScreenshot, - InteropHelp.UTF8StringHandle pchLocation); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamScreenshots_TagUser( - ScreenshotHandle hScreenshot, - CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamScreenshots_TagPublishedFile( - ScreenshotHandle hScreenshot, - PublishedFileId_t unPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamScreenshots_IsScreenshotsHooked(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamScreenshots_AddVRScreenshotToLibrary( - EVRScreenshotType eType, - InteropHelp.UTF8StringHandle pchFilename, - InteropHelp.UTF8StringHandle pchVRFilename); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_CreateQueryUserUGCRequest( - AccountID_t unAccountID, - EUserUGCList eListType, - EUGCMatchingUGCType eMatchingUGCType, - EUserUGCListSortOrder eSortOrder, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_CreateQueryAllUGCRequest( - EUGCQuery eQueryType, - EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_CreateQueryUGCDetailsRequest( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_SendQueryUGCRequest(UGCQueryHandle_t handle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCResult( - UGCQueryHandle_t handle, - uint index, - out SteamUGCDetails_t pDetails); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCPreviewURL( - UGCQueryHandle_t handle, - uint index, - IntPtr pchURL, - uint cchURLSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCMetadata( - UGCQueryHandle_t handle, - uint index, - IntPtr pchMetadata, - uint cchMetadatasize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCChildren( - UGCQueryHandle_t handle, - uint index, - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint cMaxEntries); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCStatistic( - UGCQueryHandle_t handle, - uint index, - EItemStatistic eStatType, - out ulong pStatValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUGC_GetQueryUGCNumAdditionalPreviews( - UGCQueryHandle_t handle, - uint index); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCAdditionalPreview( - UGCQueryHandle_t handle, - uint index, - uint previewIndex, - IntPtr pchURLOrVideoID, - uint cchURLSize, - IntPtr pchOriginalFileName, - uint cchOriginalFileNameSize, - out EItemPreviewType pPreviewType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUGC_GetQueryUGCNumKeyValueTags( - UGCQueryHandle_t handle, - uint index); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetQueryUGCKeyValueTag( - UGCQueryHandle_t handle, - uint index, - uint keyValueTagIndex, - IntPtr pchKey, - uint cchKeySize, - IntPtr pchValue, - uint cchValueSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_ReleaseQueryUGCRequest(UGCQueryHandle_t handle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_AddRequiredTag( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pTagName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_AddExcludedTag( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pTagName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnOnlyIDs( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnOnlyIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnKeyValueTags( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnKeyValueTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnLongDescription( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnLongDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnMetadata( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnMetadata); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnChildren( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnChildren); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnAdditionalPreviews( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnAdditionalPreviews); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetReturnTotalOnly( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnTotalOnly); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetLanguage( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pchLanguage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetAllowCachedResponse( - UGCQueryHandle_t handle, - uint unMaxAgeSeconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetCloudFileNameFilter( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pMatchCloudFileName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetMatchAnyTag(UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bMatchAnyTag); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetSearchText( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pSearchText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetRankedByTrendDays(UGCQueryHandle_t handle, uint unDays); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_AddRequiredKeyValueTag( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pKey, - InteropHelp.UTF8StringHandle pValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_RequestUGCDetails( - PublishedFileId_t nPublishedFileID, - uint unMaxAgeSeconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_CreateItem( - AppId_t nConsumerAppId, - EWorkshopFileType eFileType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_StartItemUpdate( - AppId_t nConsumerAppId, - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemTitle( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchTitle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemDescription( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemUpdateLanguage( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchLanguage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemMetadata( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchMetaData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemVisibility( - UGCUpdateHandle_t handle, - ERemoteStoragePublishedFileVisibility eVisibility); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemTags(UGCUpdateHandle_t updateHandle, IntPtr pTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemContent( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszContentFolder); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_SetItemPreview( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszPreviewFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_RemoveItemKeyValueTags( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_AddItemKeyValueTag( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_AddItemPreviewFile( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszPreviewFile, - EItemPreviewType type); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_AddItemPreviewVideo( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszVideoID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_UpdateItemPreviewFile( - UGCUpdateHandle_t handle, - uint index, - InteropHelp.UTF8StringHandle pszPreviewFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_UpdateItemPreviewVideo( - UGCUpdateHandle_t handle, - uint index, - InteropHelp.UTF8StringHandle pszVideoID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_RemoveItemPreview(UGCUpdateHandle_t handle, uint index); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_SubmitItemUpdate( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchChangeNote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EItemUpdateStatus ISteamUGC_GetItemUpdateProgress( - UGCUpdateHandle_t handle, - out ulong punBytesProcessed, - out ulong punBytesTotal); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_SetUserItemVote( - PublishedFileId_t nPublishedFileID, - [MarshalAs(UnmanagedType.I1)] bool bVoteUp); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_GetUserItemVote(PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_AddItemToFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_RemoveItemFromFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_SubscribeItem(PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_UnsubscribeItem(PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUGC_GetNumSubscribedItems(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUGC_GetSubscribedItems( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint cMaxEntries); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUGC_GetItemState(PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetItemInstallInfo( - PublishedFileId_t nPublishedFileID, - out ulong punSizeOnDisk, - IntPtr pchFolder, - uint cchFolderSize, - out uint punTimeStamp); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_GetItemDownloadInfo( - PublishedFileId_t nPublishedFileID, - out ulong punBytesDownloaded, - out ulong punBytesTotal); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_DownloadItem( - PublishedFileId_t nPublishedFileID, - [MarshalAs(UnmanagedType.I1)] bool bHighPriority); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUGC_BInitWorkshopForGameServer( - DepotId_t unWorkshopDepotID, - InteropHelp.UTF8StringHandle pszFolder); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUGC_SuspendDownloads([MarshalAs(UnmanagedType.I1)] bool bSuspend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_StartPlaytimeTracking( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_StopPlaytimeTracking( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUGC_StopPlaytimeTrackingForAllItems(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUnifiedMessages_SendMethod( - InteropHelp.UTF8StringHandle pchServiceMethod, - byte[] pRequestBuffer, - uint unRequestBufferSize, - ulong unContext); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUnifiedMessages_GetMethodResponseInfo( - ClientUnifiedMessageHandle hHandle, - out uint punResponseSize, - out EResult peResult); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUnifiedMessages_GetMethodResponseData( - ClientUnifiedMessageHandle hHandle, - byte[] pResponseBuffer, - uint unResponseBufferSize, - [MarshalAs(UnmanagedType.I1)] bool bAutoRelease); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUnifiedMessages_ReleaseMethod(ClientUnifiedMessageHandle hHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUnifiedMessages_SendNotification( - InteropHelp.UTF8StringHandle pchServiceNotification, - byte[] pNotificationBuffer, - uint unNotificationBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUser_GetHSteamUser(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_BLoggedOn(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUser_GetSteamID(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUser_InitiateGameConnection( - byte[] pAuthBlob, - int cbMaxAuthBlob, - CSteamID steamIDGameServer, - uint unIPServer, - ushort usPortServer, - [MarshalAs(UnmanagedType.I1)] bool bSecure); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_TerminateGameConnection( - uint unIPServer, - ushort usPortServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_TrackAppUsageEvent( - CGameID gameID, - int eAppUsageEvent, - InteropHelp.UTF8StringHandle pchExtraInfo); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_GetUserDataFolder(IntPtr pchBuffer, int cubBuffer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_StartVoiceRecording(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_StopVoiceRecording(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EVoiceResult ISteamUser_GetAvailableVoice( - out uint pcbCompressed, - out uint pcbUncompressed, - uint nUncompressedVoiceDesiredSampleRate); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EVoiceResult ISteamUser_GetVoice( - [MarshalAs(UnmanagedType.I1)] bool bWantCompressed, - byte[] pDestBuffer, - uint cbDestBufferSize, - out uint nBytesWritten, - [MarshalAs(UnmanagedType.I1)] bool bWantUncompressed, - byte[] pUncompressedDestBuffer, - uint cbUncompressedDestBufferSize, - out uint nUncompressBytesWritten, - uint nUncompressedVoiceDesiredSampleRate); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EVoiceResult ISteamUser_DecompressVoice( - byte[] pCompressed, - uint cbCompressed, - byte[] pDestBuffer, - uint cbDestBufferSize, - out uint nBytesWritten, - uint nDesiredSampleRate); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUser_GetVoiceOptimalSampleRate(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUser_GetAuthSessionTicket( - byte[] pTicket, - int cbMaxTicket, - out uint pcbTicket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EBeginAuthSessionResult ISteamUser_BeginAuthSession( - byte[] pAuthTicket, - int cbAuthTicket, - CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_EndAuthSession(CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_CancelAuthTicket(HAuthTicket hAuthTicket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EUserHasLicenseForAppResult ISteamUser_UserHasLicenseForApp( - CSteamID steamID, - AppId_t appID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_BIsBehindNAT(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUser_AdvertiseGame( - CSteamID steamIDGameServer, - uint unIPServer, - ushort usPortServer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUser_RequestEncryptedAppTicket( - byte[] pDataToInclude, - int cbDataToInclude); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_GetEncryptedAppTicket( - byte[] pTicket, - int cbMaxTicket, - out uint pcbTicket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUser_GetGameBadgeLevel(int nSeries, [MarshalAs(UnmanagedType.I1)] bool bFoil); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUser_GetPlayerSteamLevel(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUser_RequestStoreAuthURL( - InteropHelp.UTF8StringHandle pchRedirectURL); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_BIsPhoneVerified(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_BIsTwoFactorEnabled(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_BIsPhoneIdentifying(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUser_BIsPhoneRequiringVerification(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_RequestCurrentStats(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetStat( - InteropHelp.UTF8StringHandle pchName, - out int pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetStat_( - InteropHelp.UTF8StringHandle pchName, - out float pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_SetStat( - InteropHelp.UTF8StringHandle pchName, - int nData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_SetStat_( - InteropHelp.UTF8StringHandle pchName, - float fData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_UpdateAvgRateStat( - InteropHelp.UTF8StringHandle pchName, - float flCountThisSession, - double dSessionLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetAchievement( - InteropHelp.UTF8StringHandle pchName, - out bool pbAchieved); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_SetAchievement(InteropHelp.UTF8StringHandle pchName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_ClearAchievement(InteropHelp.UTF8StringHandle pchName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetAchievementAndUnlockTime( - InteropHelp.UTF8StringHandle pchName, - out bool pbAchieved, - out uint punUnlockTime); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_StoreStats(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUserStats_GetAchievementIcon(InteropHelp.UTF8StringHandle pchName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamUserStats_GetAchievementDisplayAttribute( - InteropHelp.UTF8StringHandle pchName, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_IndicateAchievementProgress( - InteropHelp.UTF8StringHandle pchName, - uint nCurProgress, - uint nMaxProgress); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUserStats_GetNumAchievements(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamUserStats_GetAchievementName(uint iAchievement); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_RequestUserStats(CSteamID steamIDUser); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetUserStat( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out int pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetUserStat_( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out float pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetUserAchievement( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out bool pbAchieved); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetUserAchievementAndUnlockTime( - CSteamID steamIDUser, - InteropHelp.UTF8StringHandle pchName, - out bool pbAchieved, - out uint punUnlockTime); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_ResetAllStats([MarshalAs(UnmanagedType.I1)] bool bAchievementsToo); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_FindOrCreateLeaderboard( - InteropHelp.UTF8StringHandle pchLeaderboardName, - ELeaderboardSortMethod eLeaderboardSortMethod, - ELeaderboardDisplayType eLeaderboardDisplayType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_FindLeaderboard( - InteropHelp.UTF8StringHandle pchLeaderboardName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamUserStats_GetLeaderboardName( - SteamLeaderboard_t hSteamLeaderboard); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUserStats_GetLeaderboardEntryCount( - SteamLeaderboard_t hSteamLeaderboard); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ELeaderboardSortMethod ISteamUserStats_GetLeaderboardSortMethod( - SteamLeaderboard_t hSteamLeaderboard); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ELeaderboardDisplayType ISteamUserStats_GetLeaderboardDisplayType( - SteamLeaderboard_t hSteamLeaderboard); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_DownloadLeaderboardEntries( - SteamLeaderboard_t hSteamLeaderboard, - ELeaderboardDataRequest eLeaderboardDataRequest, - int nRangeStart, - int nRangeEnd); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_DownloadLeaderboardEntriesForUsers( - SteamLeaderboard_t hSteamLeaderboard, - [In, Out] CSteamID[] prgUsers, - int cUsers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetDownloadedLeaderboardEntry( - SteamLeaderboardEntries_t hSteamLeaderboardEntries, - int index, - out LeaderboardEntry_t pLeaderboardEntry, - [In, Out] int[] pDetails, - int cDetailsMax); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_UploadLeaderboardScore( - SteamLeaderboard_t hSteamLeaderboard, - ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, - int nScore, - [In, Out] int[] pScoreDetails, - int cScoreDetailsCount); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_AttachLeaderboardUGC( - SteamLeaderboard_t hSteamLeaderboard, - UGCHandle_t hUGC); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_GetNumberOfCurrentPlayers(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_RequestGlobalAchievementPercentages(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUserStats_GetMostAchievedAchievementInfo( - IntPtr pchName, - uint unNameBufLen, - out float pflPercent, - out bool pbAchieved); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUserStats_GetNextMostAchievedAchievementInfo( - int iIteratorPrevious, - IntPtr pchName, - uint unNameBufLen, - out float pflPercent, - out bool pbAchieved); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetAchievementAchievedPercent( - InteropHelp.UTF8StringHandle pchName, - out float pflPercent); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUserStats_RequestGlobalStats(int nHistoryDays); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetGlobalStat( - InteropHelp.UTF8StringHandle pchStatName, - out long pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUserStats_GetGlobalStat_( - InteropHelp.UTF8StringHandle pchStatName, - out double pData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUserStats_GetGlobalStatHistory( - InteropHelp.UTF8StringHandle pchStatName, - [In, Out] long[] pData, - uint cubData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamUserStats_GetGlobalStatHistory_( - InteropHelp.UTF8StringHandle pchStatName, - [In, Out] double[] pData, - uint cubData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUtils_GetSecondsSinceAppActive(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUtils_GetSecondsSinceComputerActive(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EUniverse ISteamUtils_GetConnectedUniverse(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUtils_GetServerRealTime(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamUtils_GetIPCountry(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_GetImageSize( - int iImage, - out uint pnWidth, - out uint pnHeight); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_GetImageRGBA( - int iImage, - byte[] pubDest, - int nDestBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_GetCSERIPPort(out uint unIP, out ushort usPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ISteamUtils_GetCurrentBatteryPower(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUtils_GetAppID(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUtils_SetOverlayNotificationPosition( - ENotificationPosition eNotificationPosition); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_IsAPICallCompleted( - SteamAPICall_t hSteamAPICall, - out bool pbFailed); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ESteamAPICallFailure ISteamUtils_GetAPICallFailureReason( - SteamAPICall_t hSteamAPICall); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_GetAPICallResult( - SteamAPICall_t hSteamAPICall, - IntPtr pCallback, - int cubCallback, - int iCallbackExpected, - out bool pbFailed); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUtils_GetIPCCallCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUtils_SetWarningMessageHook( - SteamAPIWarningMessageHook_t pFunction); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_IsOverlayEnabled(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_BOverlayNeedsPresent(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamUtils_CheckFileSignature( - InteropHelp.UTF8StringHandle szFileName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_ShowGamepadTextInput( - EGamepadTextInputMode eInputMode, - EGamepadTextInputLineMode eLineInputMode, - InteropHelp.UTF8StringHandle pchDescription, - uint unCharMax, - InteropHelp.UTF8StringHandle pchExistingText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamUtils_GetEnteredGamepadTextLength(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_GetEnteredGamepadTextInput(IntPtr pchText, uint cchText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamUtils_GetSteamUILanguage(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_IsSteamRunningInVR(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUtils_SetOverlayNotificationInset( - int nHorizontalInset, - int nVerticalInset); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamUtils_IsSteamInBigPictureMode(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamUtils_StartVRDashboard(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamVideo_GetVideoURL(AppId_t unVideoAppID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamVideo_IsBroadcasting(out int pnNumViewers); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerHTTP_CreateHTTPRequest( - EHTTPMethod eHTTPRequestMethod, - InteropHelp.UTF8StringHandle pchAbsoluteURL); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestContextValue( - HTTPRequestHandle hRequest, - ulong ulContextValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestNetworkActivityTimeout( - HTTPRequestHandle hRequest, - uint unTimeoutSeconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestHeaderValue( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchHeaderName, - InteropHelp.UTF8StringHandle pchHeaderValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestGetOrPostParameter( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchParamName, - InteropHelp.UTF8StringHandle pchParamValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SendHTTPRequest( - HTTPRequestHandle hRequest, - out SteamAPICall_t pCallHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SendHTTPRequestAndStreamResponse( - HTTPRequestHandle hRequest, - out SteamAPICall_t pCallHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_DeferHTTPRequest(HTTPRequestHandle hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_PrioritizeHTTPRequest(HTTPRequestHandle hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPResponseHeaderSize( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchHeaderName, - out uint unResponseHeaderSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPResponseHeaderValue( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchHeaderName, - byte[] pHeaderValueBuffer, - uint unBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPResponseBodySize( - HTTPRequestHandle hRequest, - out uint unBodySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPResponseBodyData( - HTTPRequestHandle hRequest, - byte[] pBodyDataBuffer, - uint unBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPStreamingResponseBodyData( - HTTPRequestHandle hRequest, - uint cOffset, - byte[] pBodyDataBuffer, - uint unBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_ReleaseHTTPRequest(HTTPRequestHandle hRequest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPDownloadProgressPct( - HTTPRequestHandle hRequest, - out float pflPercentOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestRawPostBody( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchContentType, - byte[] pubBody, - uint unBodyLen); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerHTTP_CreateCookieContainer( - [MarshalAs(UnmanagedType.I1)] bool bAllowResponsesToModify); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_ReleaseCookieContainer( - HTTPCookieContainerHandle hCookieContainer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetCookie( - HTTPCookieContainerHandle hCookieContainer, - InteropHelp.UTF8StringHandle pchHost, - InteropHelp.UTF8StringHandle pchUrl, - InteropHelp.UTF8StringHandle pchCookie); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestCookieContainer( - HTTPRequestHandle hRequest, - HTTPCookieContainerHandle hCookieContainer); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestUserAgentInfo( - HTTPRequestHandle hRequest, - InteropHelp.UTF8StringHandle pchUserAgentInfo); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestRequiresVerifiedCertificate( - HTTPRequestHandle hRequest, - [MarshalAs(UnmanagedType.I1)] bool bRequireVerifiedCertificate); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_SetHTTPRequestAbsoluteTimeoutMS( - HTTPRequestHandle hRequest, - uint unMilliseconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerHTTP_GetHTTPRequestWasTimedOut( - HTTPRequestHandle hRequest, - out bool pbWasTimedOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EResult ISteamGameServerInventory_GetResultStatus( - SteamInventoryResult_t resultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GetResultItems( - SteamInventoryResult_t resultHandle, - [In, Out] SteamItemDetails_t[] pOutItemsArray, - ref uint punOutItemsArraySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerInventory_GetResultTimestamp( - SteamInventoryResult_t resultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_CheckResultSteamID( - SteamInventoryResult_t resultHandle, - CSteamID steamIDExpected); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerInventory_DestroyResult( - SteamInventoryResult_t resultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GetAllItems( - out SteamInventoryResult_t pResultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GetItemsByID( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemInstanceID_t[] pInstanceIDs, - uint unCountInstanceIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_SerializeResult( - SteamInventoryResult_t resultHandle, - byte[] pOutBuffer, - out uint punOutBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_DeserializeResult( - out SteamInventoryResult_t pOutResultHandle, - byte[] pBuffer, - uint unBufferSize, - [MarshalAs(UnmanagedType.I1)] bool bRESERVED_MUST_BE_FALSE); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GenerateItems( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemDef_t[] pArrayItemDefs, - [In, Out] uint[] punArrayQuantity, - uint unArrayLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GrantPromoItems( - out SteamInventoryResult_t pResultHandle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_AddPromoItem( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t itemDef); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_AddPromoItems( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemDef_t[] pArrayItemDefs, - uint unArrayLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_ConsumeItem( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemConsume, - uint unQuantity); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_ExchangeItems( - out SteamInventoryResult_t pResultHandle, - [In, Out] SteamItemDef_t[] pArrayGenerate, - [In, Out] uint[] punArrayGenerateQuantity, - uint unArrayGenerateLength, - [In, Out] SteamItemInstanceID_t[] pArrayDestroy, - [In, Out] uint[] punArrayDestroyQuantity, - uint unArrayDestroyLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_TransferItemQuantity( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemIdSource, - uint unQuantity, - SteamItemInstanceID_t itemIdDest); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerInventory_SendItemDropHeartbeat(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_TriggerItemDrop( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t dropListDefinition); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_TradeItems( - out SteamInventoryResult_t pResultHandle, - CSteamID steamIDTradePartner, - [In, Out] SteamItemInstanceID_t[] pArrayGive, - [In, Out] uint[] pArrayGiveQuantity, - uint nArrayGiveLength, - [In, Out] SteamItemInstanceID_t[] pArrayGet, - [In, Out] uint[] pArrayGetQuantity, - uint nArrayGetLength); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_LoadItemDefinitions(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GetItemDefinitionIDs( - [In, Out] SteamItemDef_t[] pItemDefIDs, - out uint punItemDefIDsArraySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GetItemDefinitionProperty( - SteamItemDef_t iDefinition, - InteropHelp.UTF8StringHandle pchPropertyName, - IntPtr pchValueBuffer, - ref uint punValueBufferSizeOut); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerInventory_RequestEligiblePromoItemDefinitionsIDs( - CSteamID steamID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerInventory_GetEligiblePromoItemDefinitionIDs( - CSteamID steamID, - [In, Out] SteamItemDef_t[] pItemDefIDs, - ref uint punItemDefIDsArraySize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_SendP2PPacket( - CSteamID steamIDRemote, - byte[] pubData, - uint cubData, - EP2PSend eP2PSendType, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_IsP2PPacketAvailable( - out uint pcubMsgSize, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_ReadP2PPacket( - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out CSteamID psteamIDRemote, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_AcceptP2PSessionWithUser( - CSteamID steamIDRemote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_CloseP2PSessionWithUser( - CSteamID steamIDRemote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_CloseP2PChannelWithUser( - CSteamID steamIDRemote, - int nChannel); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_GetP2PSessionState( - CSteamID steamIDRemote, - out P2PSessionState_t pConnectionState); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_AllowP2PPacketRelay([MarshalAs(UnmanagedType.I1)] bool bAllow); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerNetworking_CreateListenSocket( - int nVirtualP2PPort, - uint nIP, - ushort nPort, - [MarshalAs(UnmanagedType.I1)] bool bAllowUseOfPacketRelay); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerNetworking_CreateP2PConnectionSocket( - CSteamID steamIDTarget, - int nVirtualPort, - int nTimeoutSec, - [MarshalAs(UnmanagedType.I1)] bool bAllowUseOfPacketRelay); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerNetworking_CreateConnectionSocket( - uint nIP, - ushort nPort, - int nTimeoutSec); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_DestroySocket( - SNetSocket_t hSocket, - [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_DestroyListenSocket( - SNetListenSocket_t hSocket, - [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_SendDataOnSocket( - SNetSocket_t hSocket, - byte[] pubData, - uint cubData, - [MarshalAs(UnmanagedType.I1)] bool bReliable); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_IsDataAvailableOnSocket( - SNetSocket_t hSocket, - out uint pcubMsgSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_RetrieveDataFromSocket( - SNetSocket_t hSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_IsDataAvailable( - SNetListenSocket_t hListenSocket, - out uint pcubMsgSize, - out SNetSocket_t phSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_RetrieveData( - SNetListenSocket_t hListenSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out SNetSocket_t phSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_GetSocketInfo( - SNetSocket_t hSocket, - out CSteamID pSteamIDRemote, - out int peSocketStatus, - out uint punIPRemote, - out ushort punPortRemote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerNetworking_GetListenSocketInfo( - SNetListenSocket_t hListenSocket, - out uint pnIP, - out ushort pnPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ESNetSocketConnectionType ISteamGameServerNetworking_GetSocketConnectionType( - SNetSocket_t hSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern int ISteamGameServerNetworking_GetMaxPacketSize(SNetSocket_t hSocket); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_CreateQueryUserUGCRequest( - AccountID_t unAccountID, - EUserUGCList eListType, - EUGCMatchingUGCType eMatchingUGCType, - EUserUGCListSortOrder eSortOrder, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_CreateQueryAllUGCRequest( - EUGCQuery eQueryType, - EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_CreateQueryUGCDetailsRequest( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_SendQueryUGCRequest(UGCQueryHandle_t handle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCResult( - UGCQueryHandle_t handle, - uint index, - out SteamUGCDetails_t pDetails); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCPreviewURL( - UGCQueryHandle_t handle, - uint index, - IntPtr pchURL, - uint cchURLSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCMetadata( - UGCQueryHandle_t handle, - uint index, - IntPtr pchMetadata, - uint cchMetadatasize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCChildren( - UGCQueryHandle_t handle, - uint index, - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint cMaxEntries); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCStatistic( - UGCQueryHandle_t handle, - uint index, - EItemStatistic eStatType, - out ulong pStatValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUGC_GetQueryUGCNumAdditionalPreviews( - UGCQueryHandle_t handle, - uint index); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCAdditionalPreview( - UGCQueryHandle_t handle, - uint index, - uint previewIndex, - IntPtr pchURLOrVideoID, - uint cchURLSize, - IntPtr pchOriginalFileName, - uint cchOriginalFileNameSize, - out EItemPreviewType pPreviewType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUGC_GetQueryUGCNumKeyValueTags( - UGCQueryHandle_t handle, - uint index); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetQueryUGCKeyValueTag( - UGCQueryHandle_t handle, - uint index, - uint keyValueTagIndex, - IntPtr pchKey, - uint cchKeySize, - IntPtr pchValue, - uint cchValueSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_ReleaseQueryUGCRequest(UGCQueryHandle_t handle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_AddRequiredTag( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pTagName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_AddExcludedTag( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pTagName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnOnlyIDs( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnOnlyIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnKeyValueTags( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnKeyValueTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnLongDescription( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnLongDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnMetadata( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnMetadata); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnChildren( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnChildren); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnAdditionalPreviews( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnAdditionalPreviews); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetReturnTotalOnly( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bReturnTotalOnly); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetLanguage( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pchLanguage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetAllowCachedResponse( - UGCQueryHandle_t handle, - uint unMaxAgeSeconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetCloudFileNameFilter( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pMatchCloudFileName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetMatchAnyTag( - UGCQueryHandle_t handle, - [MarshalAs(UnmanagedType.I1)] bool bMatchAnyTag); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetSearchText( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pSearchText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetRankedByTrendDays( - UGCQueryHandle_t handle, - uint unDays); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_AddRequiredKeyValueTag( - UGCQueryHandle_t handle, - InteropHelp.UTF8StringHandle pKey, - InteropHelp.UTF8StringHandle pValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_RequestUGCDetails( - PublishedFileId_t nPublishedFileID, - uint unMaxAgeSeconds); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_CreateItem( - AppId_t nConsumerAppId, - EWorkshopFileType eFileType); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_StartItemUpdate( - AppId_t nConsumerAppId, - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemTitle( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchTitle); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemDescription( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchDescription); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemUpdateLanguage( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchLanguage); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemMetadata( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchMetaData); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemVisibility( - UGCUpdateHandle_t handle, - ERemoteStoragePublishedFileVisibility eVisibility); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemTags( - UGCUpdateHandle_t updateHandle, - IntPtr pTags); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemContent( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszContentFolder); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_SetItemPreview( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszPreviewFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_RemoveItemKeyValueTags( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchKey); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_AddItemKeyValueTag( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchKey, - InteropHelp.UTF8StringHandle pchValue); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_AddItemPreviewFile( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszPreviewFile, - EItemPreviewType type); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_AddItemPreviewVideo( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pszVideoID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_UpdateItemPreviewFile( - UGCUpdateHandle_t handle, - uint index, - InteropHelp.UTF8StringHandle pszPreviewFile); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_UpdateItemPreviewVideo( - UGCUpdateHandle_t handle, - uint index, - InteropHelp.UTF8StringHandle pszVideoID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_RemoveItemPreview( - UGCUpdateHandle_t handle, - uint index); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_SubmitItemUpdate( - UGCUpdateHandle_t handle, - InteropHelp.UTF8StringHandle pchChangeNote); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EItemUpdateStatus ISteamGameServerUGC_GetItemUpdateProgress( - UGCUpdateHandle_t handle, - out ulong punBytesProcessed, - out ulong punBytesTotal); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_SetUserItemVote( - PublishedFileId_t nPublishedFileID, - [MarshalAs(UnmanagedType.I1)] bool bVoteUp); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_GetUserItemVote( - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_AddItemToFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_RemoveItemFromFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_SubscribeItem(PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_UnsubscribeItem( - PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUGC_GetNumSubscribedItems(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUGC_GetSubscribedItems( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint cMaxEntries); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUGC_GetItemState(PublishedFileId_t nPublishedFileID); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetItemInstallInfo( - PublishedFileId_t nPublishedFileID, - out ulong punSizeOnDisk, - IntPtr pchFolder, - uint cchFolderSize, - out uint punTimeStamp); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_GetItemDownloadInfo( - PublishedFileId_t nPublishedFileID, - out ulong punBytesDownloaded, - out ulong punBytesTotal); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_DownloadItem( - PublishedFileId_t nPublishedFileID, - [MarshalAs(UnmanagedType.I1)] bool bHighPriority); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUGC_BInitWorkshopForGameServer( - DepotId_t unWorkshopDepotID, - InteropHelp.UTF8StringHandle pszFolder); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerUGC_SuspendDownloads([MarshalAs(UnmanagedType.I1)] bool bSuspend); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_StartPlaytimeTracking( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_StopPlaytimeTracking( - [In, Out] PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUGC_StopPlaytimeTrackingForAllItems(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUtils_GetSecondsSinceAppActive(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUtils_GetSecondsSinceComputerActive(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern EUniverse ISteamGameServerUtils_GetConnectedUniverse(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUtils_GetServerRealTime(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamGameServerUtils_GetIPCountry(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_GetImageSize( - int iImage, - out uint pnWidth, - out uint pnHeight); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_GetImageRGBA( - int iImage, - byte[] pubDest, - int nDestBufferSize); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_GetCSERIPPort(out uint unIP, out ushort usPort); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ISteamGameServerUtils_GetCurrentBatteryPower(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUtils_GetAppID(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerUtils_SetOverlayNotificationPosition( - ENotificationPosition eNotificationPosition); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_IsAPICallCompleted( - SteamAPICall_t hSteamAPICall, - out bool pbFailed); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ESteamAPICallFailure ISteamGameServerUtils_GetAPICallFailureReason( - SteamAPICall_t hSteamAPICall); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_GetAPICallResult( - SteamAPICall_t hSteamAPICall, - IntPtr pCallback, - int cubCallback, - int iCallbackExpected, - out bool pbFailed); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUtils_GetIPCCallCount(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerUtils_SetWarningMessageHook( - SteamAPIWarningMessageHook_t pFunction); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_IsOverlayEnabled(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_BOverlayNeedsPresent(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern ulong ISteamGameServerUtils_CheckFileSignature( - InteropHelp.UTF8StringHandle szFileName); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_ShowGamepadTextInput( - EGamepadTextInputMode eInputMode, - EGamepadTextInputLineMode eLineInputMode, - InteropHelp.UTF8StringHandle pchDescription, - uint unCharMax, - InteropHelp.UTF8StringHandle pchExistingText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern uint ISteamGameServerUtils_GetEnteredGamepadTextLength(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_GetEnteredGamepadTextInput( - IntPtr pchText, - uint cchText); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr ISteamGameServerUtils_GetSteamUILanguage(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_IsSteamRunningInVR(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerUtils_SetOverlayNotificationInset( - int nHorizontalInset, - int nVerticalInset); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ISteamGameServerUtils_IsSteamInBigPictureMode(); - - [DllImport("CSteamworks", CallingConvention = CallingConvention.Cdecl)] - public static extern void ISteamGameServerUtils_StartVRDashboard(); - } -} diff --git a/Src/SteamworksNET/NewLaunchQueryParameters_t.cs b/Src/SteamworksNET/NewLaunchQueryParameters_t.cs deleted file mode 100644 index 158b9588..00000000 --- a/Src/SteamworksNET/NewLaunchQueryParameters_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.NewLaunchQueryParameters_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1014)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct NewLaunchQueryParameters_t - { - public const int k_iCallback = 1014; - } -} diff --git a/Src/SteamworksNET/NumberOfCurrentPlayers_t.cs b/Src/SteamworksNET/NumberOfCurrentPlayers_t.cs deleted file mode 100644 index 4fec2675..00000000 --- a/Src/SteamworksNET/NumberOfCurrentPlayers_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.NumberOfCurrentPlayers_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1107)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct NumberOfCurrentPlayers_t - { - public const int k_iCallback = 1107; - public byte m_bSuccess; - public int m_cPlayers; - } -} diff --git a/Src/SteamworksNET/P2PSessionConnectFail_t.cs b/Src/SteamworksNET/P2PSessionConnectFail_t.cs deleted file mode 100644 index a13ffff0..00000000 --- a/Src/SteamworksNET/P2PSessionConnectFail_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.P2PSessionConnectFail_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1203)] - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct P2PSessionConnectFail_t - { - public const int k_iCallback = 1203; - public CSteamID m_steamIDRemote; - public byte m_eP2PSessionError; - } -} diff --git a/Src/SteamworksNET/P2PSessionRequest_t.cs b/Src/SteamworksNET/P2PSessionRequest_t.cs deleted file mode 100644 index 75b4ad53..00000000 --- a/Src/SteamworksNET/P2PSessionRequest_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.P2PSessionRequest_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1202)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct P2PSessionRequest_t - { - public const int k_iCallback = 1202; - public CSteamID m_steamIDRemote; - } -} diff --git a/Src/SteamworksNET/P2PSessionState_t.cs b/Src/SteamworksNET/P2PSessionState_t.cs deleted file mode 100644 index 359e7df3..00000000 --- a/Src/SteamworksNET/P2PSessionState_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.P2PSessionState_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct P2PSessionState_t - { - public byte m_bConnectionActive; - public byte m_bConnecting; - public byte m_eP2PSessionError; - public byte m_bUsingRelay; - public int m_nBytesQueuedForSend; - public int m_nPacketsQueuedForSend; - public uint m_nRemoteIP; - public ushort m_nRemotePort; - } -} diff --git a/Src/SteamworksNET/Packsize.cs b/Src/SteamworksNET/Packsize.cs deleted file mode 100644 index c91a6431..00000000 --- a/Src/SteamworksNET/Packsize.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.Packsize -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class Packsize - { - public const int value = 8; - - public static bool Test() - { - int num1 = Marshal.SizeOf(typeof (Packsize.ValvePackingSentinel_t)); - int num2 = Marshal.SizeOf(typeof (RemoteStorageEnumerateUserSubscribedFilesResult_t)); - return num1 == 32 && num2 == 616; - } - - [StructLayout(LayoutKind.Sequential, Pack = 8)] - private struct ValvePackingSentinel_t - { - private uint m_u32; - private ulong m_u64; - private ushort m_u16; - private double m_d; - } - } -} diff --git a/Src/SteamworksNET/PersonaStateChange_t.cs b/Src/SteamworksNET/PersonaStateChange_t.cs deleted file mode 100644 index c93aa7b2..00000000 --- a/Src/SteamworksNET/PersonaStateChange_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.PersonaStateChange_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(304)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct PersonaStateChange_t - { - public const int k_iCallback = 304; - public ulong m_ulSteamID; - public EPersonaChange m_nChangeFlags; - } -} diff --git a/Src/SteamworksNET/PlaybackStatusHasChanged_t.cs b/Src/SteamworksNET/PlaybackStatusHasChanged_t.cs deleted file mode 100644 index 86cb9c4d..00000000 --- a/Src/SteamworksNET/PlaybackStatusHasChanged_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.PlaybackStatusHasChanged_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4001)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct PlaybackStatusHasChanged_t - { - public const int k_iCallback = 4001; - } -} diff --git a/Src/SteamworksNET/PublishedFileId_t.cs b/Src/SteamworksNET/PublishedFileId_t.cs deleted file mode 100644 index 6901aa15..00000000 --- a/Src/SteamworksNET/PublishedFileId_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.PublishedFileId_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct PublishedFileId_t : IEquatable, IComparable - { - public static readonly PublishedFileId_t Invalid = new PublishedFileId_t(0UL); - public ulong m_PublishedFileId; - - public PublishedFileId_t(ulong value) => this.m_PublishedFileId = value; - - public override string ToString() => this.m_PublishedFileId.ToString(); - - public override bool Equals(object other) => other is PublishedFileId_t publishedFileIdT && this == publishedFileIdT; - - public override int GetHashCode() => this.m_PublishedFileId.GetHashCode(); - - public static bool operator ==(PublishedFileId_t x, PublishedFileId_t y) => (long) x.m_PublishedFileId == (long) y.m_PublishedFileId; - - public static bool operator !=(PublishedFileId_t x, PublishedFileId_t y) => !(x == y); - - public static explicit operator PublishedFileId_t(ulong value) => new PublishedFileId_t(value); - - public static explicit operator ulong(PublishedFileId_t that) => that.m_PublishedFileId; - - public bool Equals(PublishedFileId_t other) => (long) this.m_PublishedFileId == (long) other.m_PublishedFileId; - - public int CompareTo(PublishedFileId_t other) => this.m_PublishedFileId.CompareTo(other.m_PublishedFileId); - } -} diff --git a/Src/SteamworksNET/PublishedFileUpdateHandle_t.cs b/Src/SteamworksNET/PublishedFileUpdateHandle_t.cs deleted file mode 100644 index dcd34fc0..00000000 --- a/Src/SteamworksNET/PublishedFileUpdateHandle_t.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.PublishedFileUpdateHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct PublishedFileUpdateHandle_t : - IEquatable, - IComparable - { - public static readonly PublishedFileUpdateHandle_t Invalid = new PublishedFileUpdateHandle_t(ulong.MaxValue); - public ulong m_PublishedFileUpdateHandle; - - public PublishedFileUpdateHandle_t(ulong value) => this.m_PublishedFileUpdateHandle = value; - - public override string ToString() => this.m_PublishedFileUpdateHandle.ToString(); - - public override bool Equals(object other) => other is PublishedFileUpdateHandle_t fileUpdateHandleT && this == fileUpdateHandleT; - - public override int GetHashCode() => this.m_PublishedFileUpdateHandle.GetHashCode(); - - public static bool operator ==(PublishedFileUpdateHandle_t x, PublishedFileUpdateHandle_t y) => (long) x.m_PublishedFileUpdateHandle == (long) y.m_PublishedFileUpdateHandle; - - public static bool operator !=(PublishedFileUpdateHandle_t x, PublishedFileUpdateHandle_t y) => !(x == y); - - public static explicit operator PublishedFileUpdateHandle_t(ulong value) => new PublishedFileUpdateHandle_t(value); - - public static explicit operator ulong(PublishedFileUpdateHandle_t that) => that.m_PublishedFileUpdateHandle; - - public bool Equals(PublishedFileUpdateHandle_t other) => (long) this.m_PublishedFileUpdateHandle == (long) other.m_PublishedFileUpdateHandle; - - public int CompareTo(PublishedFileUpdateHandle_t other) => this.m_PublishedFileUpdateHandle.CompareTo(other.m_PublishedFileUpdateHandle); - } -} diff --git a/Src/SteamworksNET/RegisterActivationCodeResponse_t.cs b/Src/SteamworksNET/RegisterActivationCodeResponse_t.cs deleted file mode 100644 index 115697c9..00000000 --- a/Src/SteamworksNET/RegisterActivationCodeResponse_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RegisterActivationCodeResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1008)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RegisterActivationCodeResponse_t - { - public const int k_iCallback = 1008; - public ERegisterActivationCodeResult m_eResult; - public uint m_unPackageRegistered; - } -} diff --git a/Src/SteamworksNET/RemoteStorageAppSyncProgress_t.cs b/Src/SteamworksNET/RemoteStorageAppSyncProgress_t.cs deleted file mode 100644 index 8ffb7642..00000000 --- a/Src/SteamworksNET/RemoteStorageAppSyncProgress_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageAppSyncProgress_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1303)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageAppSyncProgress_t - { - public const int k_iCallback = 1303; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string m_rgchCurrentFile; - public AppId_t m_nAppID; - public uint m_uBytesTransferredThisChunk; - public double m_dAppPercentComplete; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUploading; - } -} diff --git a/Src/SteamworksNET/RemoteStorageAppSyncStatusCheck_t.cs b/Src/SteamworksNET/RemoteStorageAppSyncStatusCheck_t.cs deleted file mode 100644 index 20b54f55..00000000 --- a/Src/SteamworksNET/RemoteStorageAppSyncStatusCheck_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageAppSyncStatusCheck_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1305)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageAppSyncStatusCheck_t - { - public const int k_iCallback = 1305; - public AppId_t m_nAppID; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/RemoteStorageAppSyncedClient_t.cs b/Src/SteamworksNET/RemoteStorageAppSyncedClient_t.cs deleted file mode 100644 index ce565ec6..00000000 --- a/Src/SteamworksNET/RemoteStorageAppSyncedClient_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageAppSyncedClient_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1301)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageAppSyncedClient_t - { - public const int k_iCallback = 1301; - public AppId_t m_nAppID; - public EResult m_eResult; - public int m_unNumDownloads; - } -} diff --git a/Src/SteamworksNET/RemoteStorageAppSyncedServer_t.cs b/Src/SteamworksNET/RemoteStorageAppSyncedServer_t.cs deleted file mode 100644 index 068ba83b..00000000 --- a/Src/SteamworksNET/RemoteStorageAppSyncedServer_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageAppSyncedServer_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1302)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageAppSyncedServer_t - { - public const int k_iCallback = 1302; - public AppId_t m_nAppID; - public EResult m_eResult; - public int m_unNumUploads; - } -} diff --git a/Src/SteamworksNET/RemoteStorageDeletePublishedFileResult_t.cs b/Src/SteamworksNET/RemoteStorageDeletePublishedFileResult_t.cs deleted file mode 100644 index 51ea9c99..00000000 --- a/Src/SteamworksNET/RemoteStorageDeletePublishedFileResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageDeletePublishedFileResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1311)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageDeletePublishedFileResult_t - { - public const int k_iCallback = 1311; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - } -} diff --git a/Src/SteamworksNET/RemoteStorageDownloadUGCResult_t.cs b/Src/SteamworksNET/RemoteStorageDownloadUGCResult_t.cs deleted file mode 100644 index 1f18d6c2..00000000 --- a/Src/SteamworksNET/RemoteStorageDownloadUGCResult_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageDownloadUGCResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1317)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageDownloadUGCResult_t - { - public const int k_iCallback = 1317; - public EResult m_eResult; - public UGCHandle_t m_hFile; - public AppId_t m_nAppID; - public int m_nSizeInBytes; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string m_pchFileName; - public ulong m_ulSteamIDOwner; - } -} diff --git a/Src/SteamworksNET/RemoteStorageEnumeratePublishedFilesByUserActionRe.cs b/Src/SteamworksNET/RemoteStorageEnumeratePublishedFilesByUserActionRe.cs deleted file mode 100644 index 444a117a..00000000 --- a/Src/SteamworksNET/RemoteStorageEnumeratePublishedFilesByUserActionRe.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageEnumeratePublishedFilesByUserActionResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1328)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t - { - public const int k_iCallback = 1328; - public EResult m_eResult; - public EWorkshopFileAction m_eAction; - public int m_nResultsReturned; - public int m_nTotalResultCount; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public PublishedFileId_t[] m_rgPublishedFileId; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public uint[] m_rgRTimeUpdated; - } -} diff --git a/Src/SteamworksNET/RemoteStorageEnumerateUserPublishedFilesResult_t.cs b/Src/SteamworksNET/RemoteStorageEnumerateUserPublishedFilesResult_t.cs deleted file mode 100644 index 11ff2f48..00000000 --- a/Src/SteamworksNET/RemoteStorageEnumerateUserPublishedFilesResult_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageEnumerateUserPublishedFilesResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1312)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageEnumerateUserPublishedFilesResult_t - { - public const int k_iCallback = 1312; - public EResult m_eResult; - public int m_nResultsReturned; - public int m_nTotalResultCount; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public PublishedFileId_t[] m_rgPublishedFileId; - } -} diff --git a/Src/SteamworksNET/RemoteStorageEnumerateUserSharedWorkshopFilesResul.cs b/Src/SteamworksNET/RemoteStorageEnumerateUserSharedWorkshopFilesResul.cs deleted file mode 100644 index e5d3b2ab..00000000 --- a/Src/SteamworksNET/RemoteStorageEnumerateUserSharedWorkshopFilesResul.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageEnumerateUserSharedWorkshopFilesResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1326)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t - { - public const int k_iCallback = 1326; - public EResult m_eResult; - public int m_nResultsReturned; - public int m_nTotalResultCount; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public PublishedFileId_t[] m_rgPublishedFileId; - } -} diff --git a/Src/SteamworksNET/RemoteStorageEnumerateUserSubscribedFilesResult_t.cs b/Src/SteamworksNET/RemoteStorageEnumerateUserSubscribedFilesResult_t.cs deleted file mode 100644 index 4068d5ed..00000000 --- a/Src/SteamworksNET/RemoteStorageEnumerateUserSubscribedFilesResult_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageEnumerateUserSubscribedFilesResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1314)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageEnumerateUserSubscribedFilesResult_t - { - public const int k_iCallback = 1314; - public EResult m_eResult; - public int m_nResultsReturned; - public int m_nTotalResultCount; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public PublishedFileId_t[] m_rgPublishedFileId; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public uint[] m_rgRTimeSubscribed; - } -} diff --git a/Src/SteamworksNET/RemoteStorageEnumerateWorkshopFilesResult_t.cs b/Src/SteamworksNET/RemoteStorageEnumerateWorkshopFilesResult_t.cs deleted file mode 100644 index d04c0480..00000000 --- a/Src/SteamworksNET/RemoteStorageEnumerateWorkshopFilesResult_t.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageEnumerateWorkshopFilesResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1319)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageEnumerateWorkshopFilesResult_t - { - public const int k_iCallback = 1319; - public EResult m_eResult; - public int m_nResultsReturned; - public int m_nTotalResultCount; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public PublishedFileId_t[] m_rgPublishedFileId; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] - public float[] m_rgScore; - public AppId_t m_nAppId; - public uint m_unStartIndex; - } -} diff --git a/Src/SteamworksNET/RemoteStorageFileReadAsyncComplete_t.cs b/Src/SteamworksNET/RemoteStorageFileReadAsyncComplete_t.cs deleted file mode 100644 index d54b06bd..00000000 --- a/Src/SteamworksNET/RemoteStorageFileReadAsyncComplete_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageFileReadAsyncComplete_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1332)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageFileReadAsyncComplete_t - { - public const int k_iCallback = 1332; - public SteamAPICall_t m_hFileReadAsync; - public EResult m_eResult; - public uint m_nOffset; - public uint m_cubRead; - } -} diff --git a/Src/SteamworksNET/RemoteStorageFileShareResult_t.cs b/Src/SteamworksNET/RemoteStorageFileShareResult_t.cs deleted file mode 100644 index 68354173..00000000 --- a/Src/SteamworksNET/RemoteStorageFileShareResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageFileShareResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1307)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageFileShareResult_t - { - public const int k_iCallback = 1307; - public EResult m_eResult; - public UGCHandle_t m_hFile; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string m_rgchFilename; - } -} diff --git a/Src/SteamworksNET/RemoteStorageFileWriteAsyncComplete_t.cs b/Src/SteamworksNET/RemoteStorageFileWriteAsyncComplete_t.cs deleted file mode 100644 index e7ba684d..00000000 --- a/Src/SteamworksNET/RemoteStorageFileWriteAsyncComplete_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageFileWriteAsyncComplete_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1331)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageFileWriteAsyncComplete_t - { - public const int k_iCallback = 1331; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/RemoteStorageGetPublishedFileDetailsResult_t.cs b/Src/SteamworksNET/RemoteStorageGetPublishedFileDetailsResult_t.cs deleted file mode 100644 index 6c0761b3..00000000 --- a/Src/SteamworksNET/RemoteStorageGetPublishedFileDetailsResult_t.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageGetPublishedFileDetailsResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1318)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageGetPublishedFileDetailsResult_t - { - public const int k_iCallback = 1318; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - public AppId_t m_nCreatorAppID; - public AppId_t m_nConsumerAppID; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)] - public string m_rgchTitle; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8000)] - public string m_rgchDescription; - public UGCHandle_t m_hFile; - public UGCHandle_t m_hPreviewFile; - public ulong m_ulSteamIDOwner; - public uint m_rtimeCreated; - public uint m_rtimeUpdated; - public ERemoteStoragePublishedFileVisibility m_eVisibility; - [MarshalAs(UnmanagedType.I1)] - public bool m_bBanned; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1025)] - public string m_rgchTags; - [MarshalAs(UnmanagedType.I1)] - public bool m_bTagsTruncated; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string m_pchFileName; - public int m_nFileSize; - public int m_nPreviewFileSize; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_rgchURL; - public EWorkshopFileType m_eFileType; - [MarshalAs(UnmanagedType.I1)] - public bool m_bAcceptedForUse; - } -} diff --git a/Src/SteamworksNET/RemoteStorageGetPublishedItemVoteDetailsResult_t.cs b/Src/SteamworksNET/RemoteStorageGetPublishedItemVoteDetailsResult_t.cs deleted file mode 100644 index ee703e82..00000000 --- a/Src/SteamworksNET/RemoteStorageGetPublishedItemVoteDetailsResult_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageGetPublishedItemVoteDetailsResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1320)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageGetPublishedItemVoteDetailsResult_t - { - public const int k_iCallback = 1320; - public EResult m_eResult; - public PublishedFileId_t m_unPublishedFileId; - public int m_nVotesFor; - public int m_nVotesAgainst; - public int m_nReports; - public float m_fScore; - } -} diff --git a/Src/SteamworksNET/RemoteStoragePublishFileProgress_t.cs b/Src/SteamworksNET/RemoteStoragePublishFileProgress_t.cs deleted file mode 100644 index 3af9d671..00000000 --- a/Src/SteamworksNET/RemoteStoragePublishFileProgress_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStoragePublishFileProgress_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1329)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStoragePublishFileProgress_t - { - public const int k_iCallback = 1329; - public double m_dPercentFile; - [MarshalAs(UnmanagedType.I1)] - public bool m_bPreview; - } -} diff --git a/Src/SteamworksNET/RemoteStoragePublishFileResult_t.cs b/Src/SteamworksNET/RemoteStoragePublishFileResult_t.cs deleted file mode 100644 index e2bad023..00000000 --- a/Src/SteamworksNET/RemoteStoragePublishFileResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStoragePublishFileResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1309)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStoragePublishFileResult_t - { - public const int k_iCallback = 1309; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; - } -} diff --git a/Src/SteamworksNET/RemoteStoragePublishedFileDeleted_t.cs b/Src/SteamworksNET/RemoteStoragePublishedFileDeleted_t.cs deleted file mode 100644 index b3afcc4e..00000000 --- a/Src/SteamworksNET/RemoteStoragePublishedFileDeleted_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStoragePublishedFileDeleted_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1323)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStoragePublishedFileDeleted_t - { - public const int k_iCallback = 1323; - public PublishedFileId_t m_nPublishedFileId; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/RemoteStoragePublishedFileSubscribed_t.cs b/Src/SteamworksNET/RemoteStoragePublishedFileSubscribed_t.cs deleted file mode 100644 index 8f3e9003..00000000 --- a/Src/SteamworksNET/RemoteStoragePublishedFileSubscribed_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStoragePublishedFileSubscribed_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1321)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStoragePublishedFileSubscribed_t - { - public const int k_iCallback = 1321; - public PublishedFileId_t m_nPublishedFileId; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/RemoteStoragePublishedFileUnsubscribed_t.cs b/Src/SteamworksNET/RemoteStoragePublishedFileUnsubscribed_t.cs deleted file mode 100644 index a3273bd4..00000000 --- a/Src/SteamworksNET/RemoteStoragePublishedFileUnsubscribed_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStoragePublishedFileUnsubscribed_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1322)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStoragePublishedFileUnsubscribed_t - { - public const int k_iCallback = 1322; - public PublishedFileId_t m_nPublishedFileId; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/RemoteStoragePublishedFileUpdated_t.cs b/Src/SteamworksNET/RemoteStoragePublishedFileUpdated_t.cs deleted file mode 100644 index 6bb7a9ab..00000000 --- a/Src/SteamworksNET/RemoteStoragePublishedFileUpdated_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStoragePublishedFileUpdated_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1330)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStoragePublishedFileUpdated_t - { - public const int k_iCallback = 1330; - public PublishedFileId_t m_nPublishedFileId; - public AppId_t m_nAppID; - public ulong m_ulUnused; - } -} diff --git a/Src/SteamworksNET/RemoteStorageSetUserPublishedFileActionResult_t.cs b/Src/SteamworksNET/RemoteStorageSetUserPublishedFileActionResult_t.cs deleted file mode 100644 index 0c4df1df..00000000 --- a/Src/SteamworksNET/RemoteStorageSetUserPublishedFileActionResult_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageSetUserPublishedFileActionResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1327)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageSetUserPublishedFileActionResult_t - { - public const int k_iCallback = 1327; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - public EWorkshopFileAction m_eAction; - } -} diff --git a/Src/SteamworksNET/RemoteStorageSubscribePublishedFileResult_t.cs b/Src/SteamworksNET/RemoteStorageSubscribePublishedFileResult_t.cs deleted file mode 100644 index a94f5d5d..00000000 --- a/Src/SteamworksNET/RemoteStorageSubscribePublishedFileResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageSubscribePublishedFileResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1313)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageSubscribePublishedFileResult_t - { - public const int k_iCallback = 1313; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - } -} diff --git a/Src/SteamworksNET/RemoteStorageUnsubscribePublishedFileResult_t.cs b/Src/SteamworksNET/RemoteStorageUnsubscribePublishedFileResult_t.cs deleted file mode 100644 index 9b99f168..00000000 --- a/Src/SteamworksNET/RemoteStorageUnsubscribePublishedFileResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageUnsubscribePublishedFileResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1315)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageUnsubscribePublishedFileResult_t - { - public const int k_iCallback = 1315; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - } -} diff --git a/Src/SteamworksNET/RemoteStorageUpdatePublishedFileResult_t.cs b/Src/SteamworksNET/RemoteStorageUpdatePublishedFileResult_t.cs deleted file mode 100644 index 20d0a8b4..00000000 --- a/Src/SteamworksNET/RemoteStorageUpdatePublishedFileResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageUpdatePublishedFileResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1316)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageUpdatePublishedFileResult_t - { - public const int k_iCallback = 1316; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; - } -} diff --git a/Src/SteamworksNET/RemoteStorageUpdateUserPublishedItemVoteResult_t.cs b/Src/SteamworksNET/RemoteStorageUpdateUserPublishedItemVoteResult_t.cs deleted file mode 100644 index 6cf5aa0a..00000000 --- a/Src/SteamworksNET/RemoteStorageUpdateUserPublishedItemVoteResult_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageUpdateUserPublishedItemVoteResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1324)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageUpdateUserPublishedItemVoteResult_t - { - public const int k_iCallback = 1324; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - } -} diff --git a/Src/SteamworksNET/RemoteStorageUserVoteDetails_t.cs b/Src/SteamworksNET/RemoteStorageUserVoteDetails_t.cs deleted file mode 100644 index edf190c3..00000000 --- a/Src/SteamworksNET/RemoteStorageUserVoteDetails_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.RemoteStorageUserVoteDetails_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1325)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct RemoteStorageUserVoteDetails_t - { - public const int k_iCallback = 1325; - public EResult m_eResult; - public PublishedFileId_t m_nPublishedFileId; - public EWorkshopVote m_eVote; - } -} diff --git a/Src/SteamworksNET/SNetListenSocket_t.cs b/Src/SteamworksNET/SNetListenSocket_t.cs deleted file mode 100644 index 01b85cfd..00000000 --- a/Src/SteamworksNET/SNetListenSocket_t.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SNetListenSocket_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SNetListenSocket_t : IEquatable, IComparable - { - public uint m_SNetListenSocket; - - public SNetListenSocket_t(uint value) => this.m_SNetListenSocket = value; - - public override string ToString() => this.m_SNetListenSocket.ToString(); - - public override bool Equals(object other) => other is SNetListenSocket_t snetListenSocketT && this == snetListenSocketT; - - public override int GetHashCode() => this.m_SNetListenSocket.GetHashCode(); - - public static bool operator ==(SNetListenSocket_t x, SNetListenSocket_t y) => (int) x.m_SNetListenSocket == (int) y.m_SNetListenSocket; - - public static bool operator !=(SNetListenSocket_t x, SNetListenSocket_t y) => !(x == y); - - public static explicit operator SNetListenSocket_t(uint value) => new SNetListenSocket_t(value); - - public static explicit operator uint(SNetListenSocket_t that) => that.m_SNetListenSocket; - - public bool Equals(SNetListenSocket_t other) => (int) this.m_SNetListenSocket == (int) other.m_SNetListenSocket; - - public int CompareTo(SNetListenSocket_t other) => this.m_SNetListenSocket.CompareTo(other.m_SNetListenSocket); - } -} diff --git a/Src/SteamworksNET/SNetSocket_t.cs b/Src/SteamworksNET/SNetSocket_t.cs deleted file mode 100644 index 4532e5f3..00000000 --- a/Src/SteamworksNET/SNetSocket_t.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SNetSocket_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SNetSocket_t : IEquatable, IComparable - { - public uint m_SNetSocket; - - public SNetSocket_t(uint value) => this.m_SNetSocket = value; - - public override string ToString() => this.m_SNetSocket.ToString(); - - public override bool Equals(object other) => other is SNetSocket_t snetSocketT && this == snetSocketT; - - public override int GetHashCode() => this.m_SNetSocket.GetHashCode(); - - public static bool operator ==(SNetSocket_t x, SNetSocket_t y) => (int) x.m_SNetSocket == (int) y.m_SNetSocket; - - public static bool operator !=(SNetSocket_t x, SNetSocket_t y) => !(x == y); - - public static explicit operator SNetSocket_t(uint value) => new SNetSocket_t(value); - - public static explicit operator uint(SNetSocket_t that) => that.m_SNetSocket; - - public bool Equals(SNetSocket_t other) => (int) this.m_SNetSocket == (int) other.m_SNetSocket; - - public int CompareTo(SNetSocket_t other) => this.m_SNetSocket.CompareTo(other.m_SNetSocket); - } -} diff --git a/Src/SteamworksNET/ScreenshotHandle.cs b/Src/SteamworksNET/ScreenshotHandle.cs deleted file mode 100644 index 56926b1a..00000000 --- a/Src/SteamworksNET/ScreenshotHandle.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ScreenshotHandle -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct ScreenshotHandle : IEquatable, IComparable - { - public static readonly ScreenshotHandle Invalid = new ScreenshotHandle(0U); - public uint m_ScreenshotHandle; - - public ScreenshotHandle(uint value) => this.m_ScreenshotHandle = value; - - public override string ToString() => this.m_ScreenshotHandle.ToString(); - - public override bool Equals(object other) => other is ScreenshotHandle screenshotHandle && this == screenshotHandle; - - public override int GetHashCode() => this.m_ScreenshotHandle.GetHashCode(); - - public static bool operator ==(ScreenshotHandle x, ScreenshotHandle y) => (int) x.m_ScreenshotHandle == (int) y.m_ScreenshotHandle; - - public static bool operator !=(ScreenshotHandle x, ScreenshotHandle y) => !(x == y); - - public static explicit operator ScreenshotHandle(uint value) => new ScreenshotHandle(value); - - public static explicit operator uint(ScreenshotHandle that) => that.m_ScreenshotHandle; - - public bool Equals(ScreenshotHandle other) => (int) this.m_ScreenshotHandle == (int) other.m_ScreenshotHandle; - - public int CompareTo(ScreenshotHandle other) => this.m_ScreenshotHandle.CompareTo(other.m_ScreenshotHandle); - } -} diff --git a/Src/SteamworksNET/ScreenshotReady_t.cs b/Src/SteamworksNET/ScreenshotReady_t.cs deleted file mode 100644 index d529fce9..00000000 --- a/Src/SteamworksNET/ScreenshotReady_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ScreenshotReady_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(2301)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct ScreenshotReady_t - { - public const int k_iCallback = 2301; - public ScreenshotHandle m_hLocal; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/ScreenshotRequested_t.cs b/Src/SteamworksNET/ScreenshotRequested_t.cs deleted file mode 100644 index 3bf2dcdc..00000000 --- a/Src/SteamworksNET/ScreenshotRequested_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ScreenshotRequested_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(2302)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct ScreenshotRequested_t - { - public const int k_iCallback = 2302; - } -} diff --git a/Src/SteamworksNET/SetPersonaNameResponse_t.cs b/Src/SteamworksNET/SetPersonaNameResponse_t.cs deleted file mode 100644 index 0b80b739..00000000 --- a/Src/SteamworksNET/SetPersonaNameResponse_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SetPersonaNameResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(347)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SetPersonaNameResponse_t - { - public const int k_iCallback = 347; - [MarshalAs(UnmanagedType.I1)] - public bool m_bSuccess; - [MarshalAs(UnmanagedType.I1)] - public bool m_bLocalSuccess; - public EResult m_result; - } -} diff --git a/Src/SteamworksNET/SetUserItemVoteResult_t.cs b/Src/SteamworksNET/SetUserItemVoteResult_t.cs deleted file mode 100644 index 88232ea8..00000000 --- a/Src/SteamworksNET/SetUserItemVoteResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SetUserItemVoteResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3408)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SetUserItemVoteResult_t - { - public const int k_iCallback = 3408; - public PublishedFileId_t m_nPublishedFileId; - public EResult m_eResult; - [MarshalAs(UnmanagedType.I1)] - public bool m_bVoteUp; - } -} diff --git a/Src/SteamworksNET/SocketStatusCallback_t.cs b/Src/SteamworksNET/SocketStatusCallback_t.cs deleted file mode 100644 index 21935116..00000000 --- a/Src/SteamworksNET/SocketStatusCallback_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SocketStatusCallback_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1201)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct SocketStatusCallback_t - { - public const int k_iCallback = 1201; - public SNetSocket_t m_hSocket; - public SNetListenSocket_t m_hListenSocket; - public CSteamID m_steamIDRemote; - public int m_eSNetSocketState; - } -} diff --git a/Src/SteamworksNET/StartPlaytimeTrackingResult_t.cs b/Src/SteamworksNET/StartPlaytimeTrackingResult_t.cs deleted file mode 100644 index cb1013a0..00000000 --- a/Src/SteamworksNET/StartPlaytimeTrackingResult_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.StartPlaytimeTrackingResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3410)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct StartPlaytimeTrackingResult_t - { - public const int k_iCallback = 3410; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/SteamAPI.cs b/Src/SteamworksNET/SteamAPI.cs deleted file mode 100644 index 94b9fc6e..00000000 --- a/Src/SteamworksNET/SteamAPI.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAPI -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamAPI - { - public static bool InitSafe() => SteamAPI.Init(); - - public static bool Init() - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamAPI_Init(); - } - - public static void Shutdown() - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamAPI_Shutdown(); - } - - public static bool RestartAppIfNecessary(AppId_t unOwnAppID) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamAPI_RestartAppIfNecessary(unOwnAppID); - } - - public static void ReleaseCurrentThreadMemory() - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamAPI_ReleaseCurrentThreadMemory(); - } - - public static void RunCallbacks() - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamAPI_RunCallbacks(); - } - - public static bool IsSteamRunning() - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamAPI_IsSteamRunning(); - } - - public static HSteamUser GetHSteamUserCurrent() - { - InteropHelp.TestIfPlatformSupported(); - return (HSteamUser) NativeMethods.Steam_GetHSteamUserCurrent(); - } - - public static HSteamPipe GetHSteamPipe() - { - InteropHelp.TestIfPlatformSupported(); - return (HSteamPipe) NativeMethods.SteamAPI_GetHSteamPipe(); - } - - public static HSteamUser GetHSteamUser() - { - InteropHelp.TestIfPlatformSupported(); - return (HSteamUser) NativeMethods.SteamAPI_GetHSteamUser(); - } - } -} diff --git a/Src/SteamworksNET/SteamAPICallCompleted_t.cs b/Src/SteamworksNET/SteamAPICallCompleted_t.cs deleted file mode 100644 index 5f091a62..00000000 --- a/Src/SteamworksNET/SteamAPICallCompleted_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAPICallCompleted_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(703)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamAPICallCompleted_t - { - public const int k_iCallback = 703; - public SteamAPICall_t m_hAsyncCall; - public int m_iCallback; - public uint m_cubParam; - } -} diff --git a/Src/SteamworksNET/SteamAPICall_t.cs b/Src/SteamworksNET/SteamAPICall_t.cs deleted file mode 100644 index 3e687971..00000000 --- a/Src/SteamworksNET/SteamAPICall_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAPICall_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SteamAPICall_t : IEquatable, IComparable - { - public static readonly SteamAPICall_t Invalid = new SteamAPICall_t(0UL); - public ulong m_SteamAPICall; - - public SteamAPICall_t(ulong value) => this.m_SteamAPICall = value; - - public override string ToString() => this.m_SteamAPICall.ToString(); - - public override bool Equals(object other) => other is SteamAPICall_t steamApiCallT && this == steamApiCallT; - - public override int GetHashCode() => this.m_SteamAPICall.GetHashCode(); - - public static bool operator ==(SteamAPICall_t x, SteamAPICall_t y) => (long) x.m_SteamAPICall == (long) y.m_SteamAPICall; - - public static bool operator !=(SteamAPICall_t x, SteamAPICall_t y) => !(x == y); - - public static explicit operator SteamAPICall_t(ulong value) => new SteamAPICall_t(value); - - public static explicit operator ulong(SteamAPICall_t that) => that.m_SteamAPICall; - - public bool Equals(SteamAPICall_t other) => (long) this.m_SteamAPICall == (long) other.m_SteamAPICall; - - public int CompareTo(SteamAPICall_t other) => this.m_SteamAPICall.CompareTo(other.m_SteamAPICall); - } -} diff --git a/Src/SteamworksNET/SteamAPIWarningMessageHook_t.cs b/Src/SteamworksNET/SteamAPIWarningMessageHook_t.cs deleted file mode 100644 index 3c987854..00000000 --- a/Src/SteamworksNET/SteamAPIWarningMessageHook_t.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAPIWarningMessageHook_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; -using System.Text; - -namespace Steamworks -{ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void SteamAPIWarningMessageHook_t(int nSeverity, StringBuilder pchDebugText); -} diff --git a/Src/SteamworksNET/SteamAPI_CheckCallbackRegistered_t.cs b/Src/SteamworksNET/SteamAPI_CheckCallbackRegistered_t.cs deleted file mode 100644 index 8517de05..00000000 --- a/Src/SteamworksNET/SteamAPI_CheckCallbackRegistered_t.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAPI_CheckCallbackRegistered_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate void SteamAPI_CheckCallbackRegistered_t(int iCallbackNum); -} diff --git a/Src/SteamworksNET/SteamAppInstalled_t.cs b/Src/SteamworksNET/SteamAppInstalled_t.cs deleted file mode 100644 index bd1c3edb..00000000 --- a/Src/SteamworksNET/SteamAppInstalled_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAppInstalled_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3901)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamAppInstalled_t - { - public const int k_iCallback = 3901; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/SteamAppList.cs b/Src/SteamworksNET/SteamAppList.cs deleted file mode 100644 index 40525f3e..00000000 --- a/Src/SteamworksNET/SteamAppList.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAppList -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamAppList - { - public static uint GetNumInstalledApps() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamAppList_GetNumInstalledApps(); - } - - public static uint GetInstalledApps(AppId_t[] pvecAppID, uint unMaxAppIDs) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamAppList_GetInstalledApps(pvecAppID, unMaxAppIDs); - } - - public static int GetAppName(AppId_t nAppID, out string pchName, int cchNameMax) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cchNameMax); - int appName = NativeMethods.ISteamAppList_GetAppName(nAppID, num, cchNameMax); - pchName = appName != -1 ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return appName; - } - - public static int GetAppInstallDir(AppId_t nAppID, out string pchDirectory, int cchNameMax) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cchNameMax); - int appInstallDir = NativeMethods.ISteamAppList_GetAppInstallDir(nAppID, num, cchNameMax); - pchDirectory = appInstallDir != -1 ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return appInstallDir; - } - - public static int GetAppBuildId(AppId_t nAppID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamAppList_GetAppBuildId(nAppID); - } - } -} diff --git a/Src/SteamworksNET/SteamAppUninstalled_t.cs b/Src/SteamworksNET/SteamAppUninstalled_t.cs deleted file mode 100644 index 538ab14f..00000000 --- a/Src/SteamworksNET/SteamAppUninstalled_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamAppUninstalled_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3902)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamAppUninstalled_t - { - public const int k_iCallback = 3902; - public AppId_t m_nAppID; - } -} diff --git a/Src/SteamworksNET/SteamApps.cs b/Src/SteamworksNET/SteamApps.cs deleted file mode 100644 index e1a456b5..00000000 --- a/Src/SteamworksNET/SteamApps.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamApps -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamApps - { - public static bool BIsSubscribed() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsSubscribed(); - } - - public static bool BIsLowViolence() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsLowViolence(); - } - - public static bool BIsCybercafe() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsCybercafe(); - } - - public static bool BIsVACBanned() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsVACBanned(); - } - - public static string GetCurrentGameLanguage() - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetCurrentGameLanguage()); - } - - public static string GetAvailableGameLanguages() - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetAvailableGameLanguages()); - } - - public static bool BIsSubscribedApp(AppId_t appID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsSubscribedApp(appID); - } - - public static bool BIsDlcInstalled(AppId_t appID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsDlcInstalled(appID); - } - - public static uint GetEarliestPurchaseUnixTime(AppId_t nAppID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_GetEarliestPurchaseUnixTime(nAppID); - } - - public static bool BIsSubscribedFromFreeWeekend() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsSubscribedFromFreeWeekend(); - } - - public static int GetDLCCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_GetDLCCount(); - } - - public static bool BGetDLCDataByIndex( - int iDLC, - out AppId_t pAppID, - out bool pbAvailable, - out string pchName, - int cchNameBufferSize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cchNameBufferSize); - bool flag = NativeMethods.ISteamApps_BGetDLCDataByIndex(iDLC, out pAppID, out pbAvailable, num, cchNameBufferSize); - pchName = flag ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return flag; - } - - public static void InstallDLC(AppId_t nAppID) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamApps_InstallDLC(nAppID); - } - - public static void UninstallDLC(AppId_t nAppID) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamApps_UninstallDLC(nAppID); - } - - public static void RequestAppProofOfPurchaseKey(AppId_t nAppID) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamApps_RequestAppProofOfPurchaseKey(nAppID); - } - - public static bool GetCurrentBetaName(out string pchName, int cchNameBufferSize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cchNameBufferSize); - bool currentBetaName = NativeMethods.ISteamApps_GetCurrentBetaName(num, cchNameBufferSize); - pchName = currentBetaName ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return currentBetaName; - } - - public static bool MarkContentCorrupt(bool bMissingFilesOnly) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_MarkContentCorrupt(bMissingFilesOnly); - } - - public static uint GetInstalledDepots(AppId_t appID, DepotId_t[] pvecDepots, uint cMaxDepots) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_GetInstalledDepots(appID, pvecDepots, cMaxDepots); - } - - public static uint GetAppInstallDir( - AppId_t appID, - out string pchFolder, - uint cchFolderBufferSize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) cchFolderBufferSize); - uint appInstallDir = NativeMethods.ISteamApps_GetAppInstallDir(appID, num, cchFolderBufferSize); - pchFolder = appInstallDir != 0U ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return appInstallDir; - } - - public static bool BIsAppInstalled(AppId_t appID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_BIsAppInstalled(appID); - } - - public static CSteamID GetAppOwner() - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamApps_GetAppOwner(); - } - - public static string GetLaunchQueryParam(string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetLaunchQueryParam(pchKey1)); - } - - public static bool GetDlcDownloadProgress( - AppId_t nAppID, - out ulong punBytesDownloaded, - out ulong punBytesTotal) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_GetDlcDownloadProgress(nAppID, out punBytesDownloaded, out punBytesTotal); - } - - public static int GetAppBuildId() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamApps_GetAppBuildId(); - } - - public static void RequestAllProofOfPurchaseKeys() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamApps_RequestAllProofOfPurchaseKeys(); - } - - public static SteamAPICall_t GetFileDetails(string pszFileName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszFileName1 = new InteropHelp.UTF8StringHandle(pszFileName)) - return (SteamAPICall_t) NativeMethods.ISteamApps_GetFileDetails(pszFileName1); - } - } -} diff --git a/Src/SteamworksNET/SteamClient.cs b/Src/SteamworksNET/SteamClient.cs deleted file mode 100644 index 174c61ed..00000000 --- a/Src/SteamworksNET/SteamClient.cs +++ /dev/null @@ -1,294 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamClient -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - public static class SteamClient - { - public static HSteamPipe CreateSteamPipe() - { - InteropHelp.TestIfAvailableClient(); - return (HSteamPipe) NativeMethods.ISteamClient_CreateSteamPipe(); - } - - public static bool BReleaseSteamPipe(HSteamPipe hSteamPipe) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamClient_BReleaseSteamPipe(hSteamPipe); - } - - public static HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) - { - InteropHelp.TestIfAvailableClient(); - return (HSteamUser) NativeMethods.ISteamClient_ConnectToGlobalUser(hSteamPipe); - } - - public static HSteamUser CreateLocalUser(out HSteamPipe phSteamPipe, EAccountType eAccountType) - { - InteropHelp.TestIfAvailableClient(); - return (HSteamUser) NativeMethods.ISteamClient_CreateLocalUser(out phSteamPipe, eAccountType); - } - - public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamClient_ReleaseUser(hSteamPipe, hUser); - } - - public static IntPtr GetISteamUser( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamUser(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamGameServer( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamGameServer(hSteamUser, hSteamPipe, pchVersion1); - } - - public static void SetLocalIPBinding(uint unIP, ushort usPort) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamClient_SetLocalIPBinding(unIP, usPort); - } - - public static IntPtr GetISteamFriends( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamFriends(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamUtils(HSteamPipe hSteamPipe, string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamUtils(hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamMatchmaking( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamMatchmaking(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamMatchmakingServers( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamMatchmakingServers(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamGenericInterface( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamGenericInterface(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamUserStats( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamUserStats(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamGameServerStats( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamGameServerStats(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamApps( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamApps(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamNetworking( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamNetworking(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamRemoteStorage( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamRemoteStorage(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamScreenshots( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamScreenshots(hSteamuser, hSteamPipe, pchVersion1); - } - - public static uint GetIPCCallCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamClient_GetIPCCallCount(); - } - - public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamClient_SetWarningMessageHook(pFunction); - } - - public static bool BShutdownIfAllPipesClosed() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamClient_BShutdownIfAllPipesClosed(); - } - - public static IntPtr GetISteamHTTP( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamHTTP(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamUnifiedMessages( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamUnifiedMessages(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamController( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamController(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamUGC( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamUGC(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamAppList( - HSteamUser hSteamUser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamAppList(hSteamUser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamMusic( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamMusic(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamMusicRemote( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamMusicRemote(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamHTMLSurface( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamHTMLSurface(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamInventory( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamInventory(hSteamuser, hSteamPipe, pchVersion1); - } - - public static IntPtr GetISteamVideo( - HSteamUser hSteamuser, - HSteamPipe hSteamPipe, - string pchVersion) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVersion1 = new InteropHelp.UTF8StringHandle(pchVersion)) - return NativeMethods.ISteamClient_GetISteamVideo(hSteamuser, hSteamPipe, pchVersion1); - } - } -} diff --git a/Src/SteamworksNET/SteamController.cs b/Src/SteamworksNET/SteamController.cs deleted file mode 100644 index a1a93fe9..00000000 --- a/Src/SteamworksNET/SteamController.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamController -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - public static class SteamController - { - public static bool Init() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_Init(); - } - - public static bool Shutdown() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_Shutdown(); - } - - public static void RunFrame() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_RunFrame(); - } - - public static int GetConnectedControllers(ControllerHandle_t[] handlesOut) - { - InteropHelp.TestIfAvailableClient(); - return handlesOut.Length == 16 ? NativeMethods.ISteamController_GetConnectedControllers(handlesOut) : throw new ArgumentException("handlesOut must be the same size as Constants.STEAM_CONTROLLER_MAX_COUNT!"); - } - - public static bool ShowBindingPanel(ControllerHandle_t controllerHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_ShowBindingPanel(controllerHandle); - } - - public static ControllerActionSetHandle_t GetActionSetHandle(string pszActionSetName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszActionSetName1 = new InteropHelp.UTF8StringHandle(pszActionSetName)) - return (ControllerActionSetHandle_t) NativeMethods.ISteamController_GetActionSetHandle(pszActionSetName1); - } - - public static void ActivateActionSet( - ControllerHandle_t controllerHandle, - ControllerActionSetHandle_t actionSetHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_ActivateActionSet(controllerHandle, actionSetHandle); - } - - public static ControllerActionSetHandle_t GetCurrentActionSet( - ControllerHandle_t controllerHandle) - { - InteropHelp.TestIfAvailableClient(); - return (ControllerActionSetHandle_t) NativeMethods.ISteamController_GetCurrentActionSet(controllerHandle); - } - - public static ControllerDigitalActionHandle_t GetDigitalActionHandle(string pszActionName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszActionName1 = new InteropHelp.UTF8StringHandle(pszActionName)) - return (ControllerDigitalActionHandle_t) NativeMethods.ISteamController_GetDigitalActionHandle(pszActionName1); - } - - public static ControllerDigitalActionData_t GetDigitalActionData( - ControllerHandle_t controllerHandle, - ControllerDigitalActionHandle_t digitalActionHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_GetDigitalActionData(controllerHandle, digitalActionHandle); - } - - public static int GetDigitalActionOrigins( - ControllerHandle_t controllerHandle, - ControllerActionSetHandle_t actionSetHandle, - ControllerDigitalActionHandle_t digitalActionHandle, - EControllerActionOrigin[] originsOut) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_GetDigitalActionOrigins(controllerHandle, actionSetHandle, digitalActionHandle, originsOut); - } - - public static ControllerAnalogActionHandle_t GetAnalogActionHandle(string pszActionName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszActionName1 = new InteropHelp.UTF8StringHandle(pszActionName)) - return (ControllerAnalogActionHandle_t) NativeMethods.ISteamController_GetAnalogActionHandle(pszActionName1); - } - - public static ControllerAnalogActionData_t GetAnalogActionData( - ControllerHandle_t controllerHandle, - ControllerAnalogActionHandle_t analogActionHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_GetAnalogActionData(controllerHandle, analogActionHandle); - } - - public static int GetAnalogActionOrigins( - ControllerHandle_t controllerHandle, - ControllerActionSetHandle_t actionSetHandle, - ControllerAnalogActionHandle_t analogActionHandle, - EControllerActionOrigin[] originsOut) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_GetAnalogActionOrigins(controllerHandle, actionSetHandle, analogActionHandle, originsOut); - } - - public static void StopAnalogActionMomentum( - ControllerHandle_t controllerHandle, - ControllerAnalogActionHandle_t eAction) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_StopAnalogActionMomentum(controllerHandle, eAction); - } - - public static void TriggerHapticPulse( - ControllerHandle_t controllerHandle, - ESteamControllerPad eTargetPad, - ushort usDurationMicroSec) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_TriggerHapticPulse(controllerHandle, eTargetPad, usDurationMicroSec); - } - - public static void TriggerRepeatedHapticPulse( - ControllerHandle_t controllerHandle, - ESteamControllerPad eTargetPad, - ushort usDurationMicroSec, - ushort usOffMicroSec, - ushort unRepeat, - uint nFlags) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_TriggerRepeatedHapticPulse(controllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); - } - - public static void TriggerVibration( - ControllerHandle_t controllerHandle, - ushort usLeftSpeed, - ushort usRightSpeed) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_TriggerVibration(controllerHandle, usLeftSpeed, usRightSpeed); - } - - public static void SetLEDColor( - ControllerHandle_t controllerHandle, - byte nColorR, - byte nColorG, - byte nColorB, - uint nFlags) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamController_SetLEDColor(controllerHandle, nColorR, nColorG, nColorB, nFlags); - } - - public static int GetGamepadIndexForController(ControllerHandle_t ulControllerHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_GetGamepadIndexForController(ulControllerHandle); - } - - public static ControllerHandle_t GetControllerForGamepadIndex(int nIndex) - { - InteropHelp.TestIfAvailableClient(); - return (ControllerHandle_t) NativeMethods.ISteamController_GetControllerForGamepadIndex(nIndex); - } - - public static ControllerMotionData_t GetMotionData(ControllerHandle_t controllerHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_GetMotionData(controllerHandle); - } - - public static bool ShowDigitalActionOrigins( - ControllerHandle_t controllerHandle, - ControllerDigitalActionHandle_t digitalActionHandle, - float flScale, - float flXPosition, - float flYPosition) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_ShowDigitalActionOrigins(controllerHandle, digitalActionHandle, flScale, flXPosition, flYPosition); - } - - public static bool ShowAnalogActionOrigins( - ControllerHandle_t controllerHandle, - ControllerAnalogActionHandle_t analogActionHandle, - float flScale, - float flXPosition, - float flYPosition) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamController_ShowAnalogActionOrigins(controllerHandle, analogActionHandle, flScale, flXPosition, flYPosition); - } - - public static string GetStringForActionOrigin(EControllerActionOrigin eOrigin) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamController_GetStringForActionOrigin(eOrigin)); - } - - public static string GetGlyphForActionOrigin(EControllerActionOrigin eOrigin) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamController_GetGlyphForActionOrigin(eOrigin)); - } - } -} diff --git a/Src/SteamworksNET/SteamEncryptedAppTicket.cs b/Src/SteamworksNET/SteamEncryptedAppTicket.cs deleted file mode 100644 index a78767d5..00000000 --- a/Src/SteamworksNET/SteamEncryptedAppTicket.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamEncryptedAppTicket -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamEncryptedAppTicket - { - public static bool BDecryptTicket( - byte[] rgubTicketEncrypted, - uint cubTicketEncrypted, - byte[] rgubTicketDecrypted, - ref uint pcubTicketDecrypted, - byte[] rgubKey, - int cubKey) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamEncryptedAppTicket_BDecryptTicket(rgubTicketEncrypted, cubTicketEncrypted, rgubTicketDecrypted, ref pcubTicketDecrypted, rgubKey, cubKey); - } - - public static bool BIsTicketForApp( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - AppId_t nAppID) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamEncryptedAppTicket_BIsTicketForApp(rgubTicketDecrypted, cubTicketDecrypted, nAppID); - } - - public static uint GetTicketIssueTime(byte[] rgubTicketDecrypted, uint cubTicketDecrypted) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamEncryptedAppTicket_GetTicketIssueTime(rgubTicketDecrypted, cubTicketDecrypted); - } - - public static void GetTicketSteamID( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - out CSteamID psteamID) - { - InteropHelp.TestIfPlatformSupported(); - NativeMethods.SteamEncryptedAppTicket_GetTicketSteamID(rgubTicketDecrypted, cubTicketDecrypted, out psteamID); - } - - public static uint GetTicketAppID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamEncryptedAppTicket_GetTicketAppID(rgubTicketDecrypted, cubTicketDecrypted); - } - - public static bool BUserOwnsAppInTicket( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - AppId_t nAppID) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamEncryptedAppTicket_BUserOwnsAppInTicket(rgubTicketDecrypted, cubTicketDecrypted, nAppID); - } - - public static bool BUserIsVacBanned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted) - { - InteropHelp.TestIfPlatformSupported(); - return NativeMethods.SteamEncryptedAppTicket_BUserIsVacBanned(rgubTicketDecrypted, cubTicketDecrypted); - } - - public static byte[] GetUserVariableData( - byte[] rgubTicketDecrypted, - uint cubTicketDecrypted, - out uint pcubUserData) - { - InteropHelp.TestIfPlatformSupported(); - IntPtr userVariableData1 = NativeMethods.SteamEncryptedAppTicket_GetUserVariableData(rgubTicketDecrypted, cubTicketDecrypted, out pcubUserData); - byte[] userVariableData2 = new byte[(int) pcubUserData]; - byte[] destination = userVariableData2; - int length = (int) pcubUserData; - Marshal.Copy(userVariableData1, destination, 0, length); - return userVariableData2; - } - } -} diff --git a/Src/SteamworksNET/SteamFriends.cs b/Src/SteamworksNET/SteamFriends.cs deleted file mode 100644 index 8e8d80e0..00000000 --- a/Src/SteamworksNET/SteamFriends.cs +++ /dev/null @@ -1,476 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamFriends -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamFriends - { - public static string GetPersonaName() - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetPersonaName()); - } - - public static SteamAPICall_t SetPersonaName(string pchPersonaName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchPersonaName1 = new InteropHelp.UTF8StringHandle(pchPersonaName)) - return (SteamAPICall_t) NativeMethods.ISteamFriends_SetPersonaName(pchPersonaName1); - } - - public static EPersonaState GetPersonaState() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetPersonaState(); - } - - public static int GetFriendCount(EFriendFlags iFriendFlags) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendCount(iFriendFlags); - } - - public static CSteamID GetFriendByIndex(int iFriend, EFriendFlags iFriendFlags) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetFriendByIndex(iFriend, iFriendFlags); - } - - public static EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendRelationship(steamIDFriend); - } - - public static EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendPersonaState(steamIDFriend); - } - - public static string GetFriendPersonaName(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendPersonaName(steamIDFriend)); - } - - public static bool GetFriendGamePlayed( - CSteamID steamIDFriend, - out FriendGameInfo_t pFriendGameInfo) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendGamePlayed(steamIDFriend, out pFriendGameInfo); - } - - public static string GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendPersonaNameHistory(steamIDFriend, iPersonaName)); - } - - public static int GetFriendSteamLevel(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendSteamLevel(steamIDFriend); - } - - public static string GetPlayerNickname(CSteamID steamIDPlayer) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetPlayerNickname(steamIDPlayer)); - } - - public static int GetFriendsGroupCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendsGroupCount(); - } - - public static FriendsGroupID_t GetFriendsGroupIDByIndex(int iFG) - { - InteropHelp.TestIfAvailableClient(); - return (FriendsGroupID_t) NativeMethods.ISteamFriends_GetFriendsGroupIDByIndex(iFG); - } - - public static string GetFriendsGroupName(FriendsGroupID_t friendsGroupID) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendsGroupName(friendsGroupID)); - } - - public static int GetFriendsGroupMembersCount(FriendsGroupID_t friendsGroupID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendsGroupMembersCount(friendsGroupID); - } - - public static void GetFriendsGroupMembersList( - FriendsGroupID_t friendsGroupID, - CSteamID[] pOutSteamIDMembers, - int nMembersCount) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_GetFriendsGroupMembersList(friendsGroupID, pOutSteamIDMembers, nMembersCount); - } - - public static bool HasFriend(CSteamID steamIDFriend, EFriendFlags iFriendFlags) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_HasFriend(steamIDFriend, iFriendFlags); - } - - public static int GetClanCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetClanCount(); - } - - public static CSteamID GetClanByIndex(int iClan) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetClanByIndex(iClan); - } - - public static string GetClanName(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetClanName(steamIDClan)); - } - - public static string GetClanTag(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetClanTag(steamIDClan)); - } - - public static bool GetClanActivityCounts( - CSteamID steamIDClan, - out int pnOnline, - out int pnInGame, - out int pnChatting) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetClanActivityCounts(steamIDClan, out pnOnline, out pnInGame, out pnChatting); - } - - public static SteamAPICall_t DownloadClanActivityCounts( - CSteamID[] psteamIDClans, - int cClansToRequest) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamFriends_DownloadClanActivityCounts(psteamIDClans, cClansToRequest); - } - - public static int GetFriendCountFromSource(CSteamID steamIDSource) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendCountFromSource(steamIDSource); - } - - public static CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetFriendFromSourceByIndex(steamIDSource, iFriend); - } - - public static bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_IsUserInSource(steamIDUser, steamIDSource); - } - - public static void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_SetInGameVoiceSpeaking(steamIDUser, bSpeaking); - } - - public static void ActivateGameOverlay(string pchDialog) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchDialog1 = new InteropHelp.UTF8StringHandle(pchDialog)) - NativeMethods.ISteamFriends_ActivateGameOverlay(pchDialog1); - } - - public static void ActivateGameOverlayToUser(string pchDialog, CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchDialog1 = new InteropHelp.UTF8StringHandle(pchDialog)) - NativeMethods.ISteamFriends_ActivateGameOverlayToUser(pchDialog1, steamID); - } - - public static void ActivateGameOverlayToWebPage(string pchURL) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchURL1 = new InteropHelp.UTF8StringHandle(pchURL)) - NativeMethods.ISteamFriends_ActivateGameOverlayToWebPage(pchURL1); - } - - public static void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_ActivateGameOverlayToStore(nAppID, eFlag); - } - - public static void SetPlayedWith(CSteamID steamIDUserPlayedWith) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_SetPlayedWith(steamIDUserPlayedWith); - } - - public static void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_ActivateGameOverlayInviteDialog(steamIDLobby); - } - - public static int GetSmallFriendAvatar(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetSmallFriendAvatar(steamIDFriend); - } - - public static int GetMediumFriendAvatar(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetMediumFriendAvatar(steamIDFriend); - } - - public static int GetLargeFriendAvatar(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetLargeFriendAvatar(steamIDFriend); - } - - public static bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_RequestUserInformation(steamIDUser, bRequireNameOnly); - } - - public static SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamFriends_RequestClanOfficerList(steamIDClan); - } - - public static CSteamID GetClanOwner(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetClanOwner(steamIDClan); - } - - public static int GetClanOfficerCount(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetClanOfficerCount(steamIDClan); - } - - public static CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetClanOfficerByIndex(steamIDClan, iOfficer); - } - - public static uint GetUserRestrictions() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetUserRestrictions(); - } - - public static bool SetRichPresence(string pchKey, string pchValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - return NativeMethods.ISteamFriends_SetRichPresence(pchKey1, pchValue1); - } - } - - public static void ClearRichPresence() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_ClearRichPresence(); - } - - public static string GetFriendRichPresence(CSteamID steamIDFriend, string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendRichPresence(steamIDFriend, pchKey1)); - } - - public static int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendRichPresenceKeyCount(steamIDFriend); - } - - public static string GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendRichPresenceKeyByIndex(steamIDFriend, iKey)); - } - - public static void RequestFriendRichPresence(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamFriends_RequestFriendRichPresence(steamIDFriend); - } - - public static bool InviteUserToGame(CSteamID steamIDFriend, string pchConnectString) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchConnectString1 = new InteropHelp.UTF8StringHandle(pchConnectString)) - return NativeMethods.ISteamFriends_InviteUserToGame(steamIDFriend, pchConnectString1); - } - - public static int GetCoplayFriendCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetCoplayFriendCount(); - } - - public static CSteamID GetCoplayFriend(int iCoplayFriend) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetCoplayFriend(iCoplayFriend); - } - - public static int GetFriendCoplayTime(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetFriendCoplayTime(steamIDFriend); - } - - public static AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) - { - InteropHelp.TestIfAvailableClient(); - return (AppId_t) NativeMethods.ISteamFriends_GetFriendCoplayGame(steamIDFriend); - } - - public static SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamFriends_JoinClanChatRoom(steamIDClan); - } - - public static bool LeaveClanChatRoom(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_LeaveClanChatRoom(steamIDClan); - } - - public static int GetClanChatMemberCount(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_GetClanChatMemberCount(steamIDClan); - } - - public static CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamFriends_GetChatMemberByIndex(steamIDClan, iUser); - } - - public static bool SendClanChatMessage(CSteamID steamIDClanChat, string pchText) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchText1 = new InteropHelp.UTF8StringHandle(pchText)) - return NativeMethods.ISteamFriends_SendClanChatMessage(steamIDClanChat, pchText1); - } - - public static int GetClanChatMessage( - CSteamID steamIDClanChat, - int iMessage, - out string prgchText, - int cchTextMax, - out EChatEntryType peChatEntryType, - out CSteamID psteamidChatter) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cchTextMax); - int clanChatMessage = NativeMethods.ISteamFriends_GetClanChatMessage(steamIDClanChat, iMessage, num, cchTextMax, out peChatEntryType, out psteamidChatter); - prgchText = clanChatMessage != 0 ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return clanChatMessage; - } - - public static bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_IsClanChatAdmin(steamIDClanChat, steamIDUser); - } - - public static bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_IsClanChatWindowOpenInSteam(steamIDClanChat); - } - - public static bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_OpenClanChatWindowInSteam(steamIDClanChat); - } - - public static bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_CloseClanChatWindowInSteam(steamIDClanChat); - } - - public static bool SetListenForFriendsMessages(bool bInterceptEnabled) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamFriends_SetListenForFriendsMessages(bInterceptEnabled); - } - - public static bool ReplyToFriendMessage(CSteamID steamIDFriend, string pchMsgToSend) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchMsgToSend1 = new InteropHelp.UTF8StringHandle(pchMsgToSend)) - return NativeMethods.ISteamFriends_ReplyToFriendMessage(steamIDFriend, pchMsgToSend1); - } - - public static int GetFriendMessage( - CSteamID steamIDFriend, - int iMessageID, - out string pvData, - int cubData, - out EChatEntryType peChatEntryType) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cubData); - int friendMessage = NativeMethods.ISteamFriends_GetFriendMessage(steamIDFriend, iMessageID, num, cubData, out peChatEntryType); - pvData = friendMessage != 0 ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return friendMessage; - } - - public static SteamAPICall_t GetFollowerCount(CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamFriends_GetFollowerCount(steamID); - } - - public static SteamAPICall_t IsFollowing(CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamFriends_IsFollowing(steamID); - } - - public static SteamAPICall_t EnumerateFollowingList(uint unStartIndex) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamFriends_EnumerateFollowingList(unStartIndex); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServer.cs b/Src/SteamworksNET/SteamGameServer.cs deleted file mode 100644 index 7c84c5d8..00000000 --- a/Src/SteamworksNET/SteamGameServer.cs +++ /dev/null @@ -1,311 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServer -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamGameServer - { - public static bool InitGameServer( - uint unIP, - ushort usGamePort, - ushort usQueryPort, - uint unFlags, - AppId_t nGameAppId, - string pchVersionString) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchVersionString1 = new InteropHelp.UTF8StringHandle(pchVersionString)) - return NativeMethods.ISteamGameServer_InitGameServer(unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString1); - } - - public static void SetProduct(string pszProduct) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszProduct1 = new InteropHelp.UTF8StringHandle(pszProduct)) - NativeMethods.ISteamGameServer_SetProduct(pszProduct1); - } - - public static void SetGameDescription(string pszGameDescription) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszGameDescription1 = new InteropHelp.UTF8StringHandle(pszGameDescription)) - NativeMethods.ISteamGameServer_SetGameDescription(pszGameDescription1); - } - - public static void SetModDir(string pszModDir) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszModDir1 = new InteropHelp.UTF8StringHandle(pszModDir)) - NativeMethods.ISteamGameServer_SetModDir(pszModDir1); - } - - public static void SetDedicatedServer(bool bDedicated) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SetDedicatedServer(bDedicated); - } - - public static void LogOn(string pszToken) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszToken1 = new InteropHelp.UTF8StringHandle(pszToken)) - NativeMethods.ISteamGameServer_LogOn(pszToken1); - } - - public static void LogOnAnonymous() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_LogOnAnonymous(); - } - - public static void LogOff() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_LogOff(); - } - - public static bool BLoggedOn() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_BLoggedOn(); - } - - public static bool BSecure() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_BSecure(); - } - - public static CSteamID GetSteamID() - { - InteropHelp.TestIfAvailableGameServer(); - return (CSteamID) NativeMethods.ISteamGameServer_GetSteamID(); - } - - public static bool WasRestartRequested() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_WasRestartRequested(); - } - - public static void SetMaxPlayerCount(int cPlayersMax) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SetMaxPlayerCount(cPlayersMax); - } - - public static void SetBotPlayerCount(int cBotplayers) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SetBotPlayerCount(cBotplayers); - } - - public static void SetServerName(string pszServerName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszServerName1 = new InteropHelp.UTF8StringHandle(pszServerName)) - NativeMethods.ISteamGameServer_SetServerName(pszServerName1); - } - - public static void SetMapName(string pszMapName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszMapName1 = new InteropHelp.UTF8StringHandle(pszMapName)) - NativeMethods.ISteamGameServer_SetMapName(pszMapName1); - } - - public static void SetPasswordProtected(bool bPasswordProtected) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SetPasswordProtected(bPasswordProtected); - } - - public static void SetSpectatorPort(ushort unSpectatorPort) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SetSpectatorPort(unSpectatorPort); - } - - public static void SetSpectatorServerName(string pszSpectatorServerName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszSpectatorServerName1 = new InteropHelp.UTF8StringHandle(pszSpectatorServerName)) - NativeMethods.ISteamGameServer_SetSpectatorServerName(pszSpectatorServerName1); - } - - public static void ClearAllKeyValues() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_ClearAllKeyValues(); - } - - public static void SetKeyValue(string pKey, string pValue) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pKey1 = new InteropHelp.UTF8StringHandle(pKey)) - { - using (InteropHelp.UTF8StringHandle pValue1 = new InteropHelp.UTF8StringHandle(pValue)) - NativeMethods.ISteamGameServer_SetKeyValue(pKey1, pValue1); - } - } - - public static void SetGameTags(string pchGameTags) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchGameTags1 = new InteropHelp.UTF8StringHandle(pchGameTags)) - NativeMethods.ISteamGameServer_SetGameTags(pchGameTags1); - } - - public static void SetGameData(string pchGameData) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchGameData1 = new InteropHelp.UTF8StringHandle(pchGameData)) - NativeMethods.ISteamGameServer_SetGameData(pchGameData1); - } - - public static void SetRegion(string pszRegion) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszRegion1 = new InteropHelp.UTF8StringHandle(pszRegion)) - NativeMethods.ISteamGameServer_SetRegion(pszRegion1); - } - - public static bool SendUserConnectAndAuthenticate( - uint unIPClient, - byte[] pvAuthBlob, - uint cubAuthBlobSize, - out CSteamID pSteamIDUser) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_SendUserConnectAndAuthenticate(unIPClient, pvAuthBlob, cubAuthBlobSize, out pSteamIDUser); - } - - public static CSteamID CreateUnauthenticatedUserConnection() - { - InteropHelp.TestIfAvailableGameServer(); - return (CSteamID) NativeMethods.ISteamGameServer_CreateUnauthenticatedUserConnection(); - } - - public static void SendUserDisconnect(CSteamID steamIDUser) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SendUserDisconnect(steamIDUser); - } - - public static bool BUpdateUserData(CSteamID steamIDUser, string pchPlayerName, uint uScore) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchPlayerName1 = new InteropHelp.UTF8StringHandle(pchPlayerName)) - return NativeMethods.ISteamGameServer_BUpdateUserData(steamIDUser, pchPlayerName1, uScore); - } - - public static HAuthTicket GetAuthSessionTicket( - byte[] pTicket, - int cbMaxTicket, - out uint pcbTicket) - { - InteropHelp.TestIfAvailableGameServer(); - return (HAuthTicket) NativeMethods.ISteamGameServer_GetAuthSessionTicket(pTicket, cbMaxTicket, out pcbTicket); - } - - public static EBeginAuthSessionResult BeginAuthSession( - byte[] pAuthTicket, - int cbAuthTicket, - CSteamID steamID) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_BeginAuthSession(pAuthTicket, cbAuthTicket, steamID); - } - - public static void EndAuthSession(CSteamID steamID) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_EndAuthSession(steamID); - } - - public static void CancelAuthTicket(HAuthTicket hAuthTicket) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_CancelAuthTicket(hAuthTicket); - } - - public static EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_UserHasLicenseForApp(steamID, appID); - } - - public static bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_RequestUserGroupStatus(steamIDUser, steamIDGroup); - } - - public static void GetGameplayStats() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_GetGameplayStats(); - } - - public static SteamAPICall_t GetServerReputation() - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServer_GetServerReputation(); - } - - public static uint GetPublicIP() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_GetPublicIP(); - } - - public static bool HandleIncomingPacket(byte[] pData, int cbData, uint srcIP, ushort srcPort) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_HandleIncomingPacket(pData, cbData, srcIP, srcPort); - } - - public static int GetNextOutgoingPacket( - byte[] pOut, - int cbMaxOut, - out uint pNetAdr, - out ushort pPort) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServer_GetNextOutgoingPacket(pOut, cbMaxOut, out pNetAdr, out pPort); - } - - public static void EnableHeartbeats(bool bActive) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_EnableHeartbeats(bActive); - } - - public static void SetHeartbeatInterval(int iHeartbeatInterval) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_SetHeartbeatInterval(iHeartbeatInterval); - } - - public static void ForceHeartbeat() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServer_ForceHeartbeat(); - } - - public static SteamAPICall_t AssociateWithClan(CSteamID steamIDClan) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServer_AssociateWithClan(steamIDClan); - } - - public static SteamAPICall_t ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServer_ComputeNewPlayerCompatibility(steamIDNewPlayer); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServerHTTP.cs b/Src/SteamworksNET/SteamGameServerHTTP.cs deleted file mode 100644 index 2885d4c8..00000000 --- a/Src/SteamworksNET/SteamGameServerHTTP.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServerHTTP -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamGameServerHTTP - { - public static HTTPRequestHandle CreateHTTPRequest( - EHTTPMethod eHTTPRequestMethod, - string pchAbsoluteURL) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchAbsoluteURL1 = new InteropHelp.UTF8StringHandle(pchAbsoluteURL)) - return (HTTPRequestHandle) NativeMethods.ISteamGameServerHTTP_CreateHTTPRequest(eHTTPRequestMethod, pchAbsoluteURL1); - } - - public static bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, ulong ulContextValue) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestContextValue(hRequest, ulContextValue); - } - - public static bool SetHTTPRequestNetworkActivityTimeout( - HTTPRequestHandle hRequest, - uint unTimeoutSeconds) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestNetworkActivityTimeout(hRequest, unTimeoutSeconds); - } - - public static bool SetHTTPRequestHeaderValue( - HTTPRequestHandle hRequest, - string pchHeaderName, - string pchHeaderValue) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchHeaderName1 = new InteropHelp.UTF8StringHandle(pchHeaderName)) - { - using (InteropHelp.UTF8StringHandle pchHeaderValue1 = new InteropHelp.UTF8StringHandle(pchHeaderValue)) - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestHeaderValue(hRequest, pchHeaderName1, pchHeaderValue1); - } - } - - public static bool SetHTTPRequestGetOrPostParameter( - HTTPRequestHandle hRequest, - string pchParamName, - string pchParamValue) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchParamName1 = new InteropHelp.UTF8StringHandle(pchParamName)) - { - using (InteropHelp.UTF8StringHandle pchParamValue1 = new InteropHelp.UTF8StringHandle(pchParamValue)) - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestGetOrPostParameter(hRequest, pchParamName1, pchParamValue1); - } - } - - public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SendHTTPRequest(hRequest, out pCallHandle); - } - - public static bool SendHTTPRequestAndStreamResponse( - HTTPRequestHandle hRequest, - out SteamAPICall_t pCallHandle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SendHTTPRequestAndStreamResponse(hRequest, out pCallHandle); - } - - public static bool DeferHTTPRequest(HTTPRequestHandle hRequest) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_DeferHTTPRequest(hRequest); - } - - public static bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_PrioritizeHTTPRequest(hRequest); - } - - public static bool GetHTTPResponseHeaderSize( - HTTPRequestHandle hRequest, - string pchHeaderName, - out uint unResponseHeaderSize) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchHeaderName1 = new InteropHelp.UTF8StringHandle(pchHeaderName)) - return NativeMethods.ISteamGameServerHTTP_GetHTTPResponseHeaderSize(hRequest, pchHeaderName1, out unResponseHeaderSize); - } - - public static bool GetHTTPResponseHeaderValue( - HTTPRequestHandle hRequest, - string pchHeaderName, - byte[] pHeaderValueBuffer, - uint unBufferSize) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchHeaderName1 = new InteropHelp.UTF8StringHandle(pchHeaderName)) - return NativeMethods.ISteamGameServerHTTP_GetHTTPResponseHeaderValue(hRequest, pchHeaderName1, pHeaderValueBuffer, unBufferSize); - } - - public static bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, out uint unBodySize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_GetHTTPResponseBodySize(hRequest, out unBodySize); - } - - public static bool GetHTTPResponseBodyData( - HTTPRequestHandle hRequest, - byte[] pBodyDataBuffer, - uint unBufferSize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_GetHTTPResponseBodyData(hRequest, pBodyDataBuffer, unBufferSize); - } - - public static bool GetHTTPStreamingResponseBodyData( - HTTPRequestHandle hRequest, - uint cOffset, - byte[] pBodyDataBuffer, - uint unBufferSize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_GetHTTPStreamingResponseBodyData(hRequest, cOffset, pBodyDataBuffer, unBufferSize); - } - - public static bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_ReleaseHTTPRequest(hRequest); - } - - public static bool GetHTTPDownloadProgressPct( - HTTPRequestHandle hRequest, - out float pflPercentOut) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_GetHTTPDownloadProgressPct(hRequest, out pflPercentOut); - } - - public static bool SetHTTPRequestRawPostBody( - HTTPRequestHandle hRequest, - string pchContentType, - byte[] pubBody, - uint unBodyLen) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchContentType1 = new InteropHelp.UTF8StringHandle(pchContentType)) - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestRawPostBody(hRequest, pchContentType1, pubBody, unBodyLen); - } - - public static HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify) - { - InteropHelp.TestIfAvailableGameServer(); - return (HTTPCookieContainerHandle) NativeMethods.ISteamGameServerHTTP_CreateCookieContainer(bAllowResponsesToModify); - } - - public static bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_ReleaseCookieContainer(hCookieContainer); - } - - public static bool SetCookie( - HTTPCookieContainerHandle hCookieContainer, - string pchHost, - string pchUrl, - string pchCookie) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchHost1 = new InteropHelp.UTF8StringHandle(pchHost)) - { - using (InteropHelp.UTF8StringHandle pchUrl1 = new InteropHelp.UTF8StringHandle(pchUrl)) - { - using (InteropHelp.UTF8StringHandle pchCookie1 = new InteropHelp.UTF8StringHandle(pchCookie)) - return NativeMethods.ISteamGameServerHTTP_SetCookie(hCookieContainer, pchHost1, pchUrl1, pchCookie1); - } - } - } - - public static bool SetHTTPRequestCookieContainer( - HTTPRequestHandle hRequest, - HTTPCookieContainerHandle hCookieContainer) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestCookieContainer(hRequest, hCookieContainer); - } - - public static bool SetHTTPRequestUserAgentInfo( - HTTPRequestHandle hRequest, - string pchUserAgentInfo) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchUserAgentInfo1 = new InteropHelp.UTF8StringHandle(pchUserAgentInfo)) - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestUserAgentInfo(hRequest, pchUserAgentInfo1); - } - - public static bool SetHTTPRequestRequiresVerifiedCertificate( - HTTPRequestHandle hRequest, - bool bRequireVerifiedCertificate) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestRequiresVerifiedCertificate(hRequest, bRequireVerifiedCertificate); - } - - public static bool SetHTTPRequestAbsoluteTimeoutMS( - HTTPRequestHandle hRequest, - uint unMilliseconds) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestAbsoluteTimeoutMS(hRequest, unMilliseconds); - } - - public static bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, out bool pbWasTimedOut) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerHTTP_GetHTTPRequestWasTimedOut(hRequest, out pbWasTimedOut); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServerInventory.cs b/Src/SteamworksNET/SteamGameServerInventory.cs deleted file mode 100644 index 7befabe7..00000000 --- a/Src/SteamworksNET/SteamGameServerInventory.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServerInventory -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamGameServerInventory - { - public static EResult GetResultStatus(SteamInventoryResult_t resultHandle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetResultStatus(resultHandle); - } - - public static bool GetResultItems( - SteamInventoryResult_t resultHandle, - SteamItemDetails_t[] pOutItemsArray, - ref uint punOutItemsArraySize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetResultItems(resultHandle, pOutItemsArray, ref punOutItemsArraySize); - } - - public static uint GetResultTimestamp(SteamInventoryResult_t resultHandle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetResultTimestamp(resultHandle); - } - - public static bool CheckResultSteamID( - SteamInventoryResult_t resultHandle, - CSteamID steamIDExpected) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_CheckResultSteamID(resultHandle, steamIDExpected); - } - - public static void DestroyResult(SteamInventoryResult_t resultHandle) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerInventory_DestroyResult(resultHandle); - } - - public static bool GetAllItems(out SteamInventoryResult_t pResultHandle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetAllItems(out pResultHandle); - } - - public static bool GetItemsByID( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t[] pInstanceIDs, - uint unCountInstanceIDs) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetItemsByID(out pResultHandle, pInstanceIDs, unCountInstanceIDs); - } - - public static bool SerializeResult( - SteamInventoryResult_t resultHandle, - byte[] pOutBuffer, - out uint punOutBufferSize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_SerializeResult(resultHandle, pOutBuffer, out punOutBufferSize); - } - - public static bool DeserializeResult( - out SteamInventoryResult_t pOutResultHandle, - byte[] pBuffer, - uint unBufferSize, - bool bRESERVED_MUST_BE_FALSE = false) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_DeserializeResult(out pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE); - } - - public static bool GenerateItems( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t[] pArrayItemDefs, - uint[] punArrayQuantity, - uint unArrayLength) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GenerateItems(out pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength); - } - - public static bool GrantPromoItems(out SteamInventoryResult_t pResultHandle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GrantPromoItems(out pResultHandle); - } - - public static bool AddPromoItem( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t itemDef) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_AddPromoItem(out pResultHandle, itemDef); - } - - public static bool AddPromoItems( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t[] pArrayItemDefs, - uint unArrayLength) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_AddPromoItems(out pResultHandle, pArrayItemDefs, unArrayLength); - } - - public static bool ConsumeItem( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemConsume, - uint unQuantity) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_ConsumeItem(out pResultHandle, itemConsume, unQuantity); - } - - public static bool ExchangeItems( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t[] pArrayGenerate, - uint[] punArrayGenerateQuantity, - uint unArrayGenerateLength, - SteamItemInstanceID_t[] pArrayDestroy, - uint[] punArrayDestroyQuantity, - uint unArrayDestroyLength) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_ExchangeItems(out pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength); - } - - public static bool TransferItemQuantity( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemIdSource, - uint unQuantity, - SteamItemInstanceID_t itemIdDest) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_TransferItemQuantity(out pResultHandle, itemIdSource, unQuantity, itemIdDest); - } - - public static void SendItemDropHeartbeat() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerInventory_SendItemDropHeartbeat(); - } - - public static bool TriggerItemDrop( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t dropListDefinition) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_TriggerItemDrop(out pResultHandle, dropListDefinition); - } - - public static bool TradeItems( - out SteamInventoryResult_t pResultHandle, - CSteamID steamIDTradePartner, - SteamItemInstanceID_t[] pArrayGive, - uint[] pArrayGiveQuantity, - uint nArrayGiveLength, - SteamItemInstanceID_t[] pArrayGet, - uint[] pArrayGetQuantity, - uint nArrayGetLength) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_TradeItems(out pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength); - } - - public static bool LoadItemDefinitions() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_LoadItemDefinitions(); - } - - public static bool GetItemDefinitionIDs( - SteamItemDef_t[] pItemDefIDs, - out uint punItemDefIDsArraySize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetItemDefinitionIDs(pItemDefIDs, out punItemDefIDsArraySize); - } - - public static bool GetItemDefinitionProperty( - SteamItemDef_t iDefinition, - string pchPropertyName, - out string pchValueBuffer, - ref uint punValueBufferSizeOut) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num = Marshal.AllocHGlobal((int) punValueBufferSizeOut); - using (InteropHelp.UTF8StringHandle pchPropertyName1 = new InteropHelp.UTF8StringHandle(pchPropertyName)) - { - bool definitionProperty = NativeMethods.ISteamGameServerInventory_GetItemDefinitionProperty(iDefinition, pchPropertyName1, num, ref punValueBufferSizeOut); - pchValueBuffer = definitionProperty ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return definitionProperty; - } - } - - public static SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerInventory_RequestEligiblePromoItemDefinitionsIDs(steamID); - } - - public static bool GetEligiblePromoItemDefinitionIDs( - CSteamID steamID, - SteamItemDef_t[] pItemDefIDs, - ref uint punItemDefIDsArraySize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerInventory_GetEligiblePromoItemDefinitionIDs(steamID, pItemDefIDs, ref punItemDefIDsArraySize); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServerNetworking.cs b/Src/SteamworksNET/SteamGameServerNetworking.cs deleted file mode 100644 index a4a47700..00000000 --- a/Src/SteamworksNET/SteamGameServerNetworking.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServerNetworking -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamGameServerNetworking - { - public static bool SendP2PPacket( - CSteamID steamIDRemote, - byte[] pubData, - uint cubData, - EP2PSend eP2PSendType, - int nChannel = 0) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_SendP2PPacket(steamIDRemote, pubData, cubData, eP2PSendType, nChannel); - } - - public static bool IsP2PPacketAvailable(out uint pcubMsgSize, int nChannel = 0) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_IsP2PPacketAvailable(out pcubMsgSize, nChannel); - } - - public static bool ReadP2PPacket( - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out CSteamID psteamIDRemote, - int nChannel = 0) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_ReadP2PPacket(pubDest, cubDest, out pcubMsgSize, out psteamIDRemote, nChannel); - } - - public static bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_AcceptP2PSessionWithUser(steamIDRemote); - } - - public static bool CloseP2PSessionWithUser(CSteamID steamIDRemote) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_CloseP2PSessionWithUser(steamIDRemote); - } - - public static bool CloseP2PChannelWithUser(CSteamID steamIDRemote, int nChannel) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_CloseP2PChannelWithUser(steamIDRemote, nChannel); - } - - public static bool GetP2PSessionState( - CSteamID steamIDRemote, - out P2PSessionState_t pConnectionState) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_GetP2PSessionState(steamIDRemote, out pConnectionState); - } - - public static bool AllowP2PPacketRelay(bool bAllow) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_AllowP2PPacketRelay(bAllow); - } - - public static SNetListenSocket_t CreateListenSocket( - int nVirtualP2PPort, - uint nIP, - ushort nPort, - bool bAllowUseOfPacketRelay) - { - InteropHelp.TestIfAvailableGameServer(); - return (SNetListenSocket_t) NativeMethods.ISteamGameServerNetworking_CreateListenSocket(nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay); - } - - public static SNetSocket_t CreateP2PConnectionSocket( - CSteamID steamIDTarget, - int nVirtualPort, - int nTimeoutSec, - bool bAllowUseOfPacketRelay) - { - InteropHelp.TestIfAvailableGameServer(); - return (SNetSocket_t) NativeMethods.ISteamGameServerNetworking_CreateP2PConnectionSocket(steamIDTarget, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay); - } - - public static SNetSocket_t CreateConnectionSocket(uint nIP, ushort nPort, int nTimeoutSec) - { - InteropHelp.TestIfAvailableGameServer(); - return (SNetSocket_t) NativeMethods.ISteamGameServerNetworking_CreateConnectionSocket(nIP, nPort, nTimeoutSec); - } - - public static bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_DestroySocket(hSocket, bNotifyRemoteEnd); - } - - public static bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_DestroyListenSocket(hSocket, bNotifyRemoteEnd); - } - - public static bool SendDataOnSocket( - SNetSocket_t hSocket, - byte[] pubData, - uint cubData, - bool bReliable) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_SendDataOnSocket(hSocket, pubData, cubData, bReliable); - } - - public static bool IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_IsDataAvailableOnSocket(hSocket, out pcubMsgSize); - } - - public static bool RetrieveDataFromSocket( - SNetSocket_t hSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_RetrieveDataFromSocket(hSocket, pubDest, cubDest, out pcubMsgSize); - } - - public static bool IsDataAvailable( - SNetListenSocket_t hListenSocket, - out uint pcubMsgSize, - out SNetSocket_t phSocket) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_IsDataAvailable(hListenSocket, out pcubMsgSize, out phSocket); - } - - public static bool RetrieveData( - SNetListenSocket_t hListenSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out SNetSocket_t phSocket) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_RetrieveData(hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket); - } - - public static bool GetSocketInfo( - SNetSocket_t hSocket, - out CSteamID pSteamIDRemote, - out int peSocketStatus, - out uint punIPRemote, - out ushort punPortRemote) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_GetSocketInfo(hSocket, out pSteamIDRemote, out peSocketStatus, out punIPRemote, out punPortRemote); - } - - public static bool GetListenSocketInfo( - SNetListenSocket_t hListenSocket, - out uint pnIP, - out ushort pnPort) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_GetListenSocketInfo(hListenSocket, out pnIP, out pnPort); - } - - public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_GetSocketConnectionType(hSocket); - } - - public static int GetMaxPacketSize(SNetSocket_t hSocket) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerNetworking_GetMaxPacketSize(hSocket); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServerStats.cs b/Src/SteamworksNET/SteamGameServerStats.cs deleted file mode 100644 index 064fef36..00000000 --- a/Src/SteamworksNET/SteamGameServerStats.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServerStats -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamGameServerStats - { - public static SteamAPICall_t RequestUserStats(CSteamID steamIDUser) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerStats_RequestUserStats(steamIDUser); - } - - public static bool GetUserStat(CSteamID steamIDUser, string pchName, out int pData) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_GetUserStat(steamIDUser, pchName1, out pData); - } - - public static bool GetUserStat(CSteamID steamIDUser, string pchName, out float pData) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_GetUserStat_(steamIDUser, pchName1, out pData); - } - - public static bool GetUserAchievement( - CSteamID steamIDUser, - string pchName, - out bool pbAchieved) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_GetUserAchievement(steamIDUser, pchName1, out pbAchieved); - } - - public static bool SetUserStat(CSteamID steamIDUser, string pchName, int nData) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_SetUserStat(steamIDUser, pchName1, nData); - } - - public static bool SetUserStat(CSteamID steamIDUser, string pchName, float fData) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_SetUserStat_(steamIDUser, pchName1, fData); - } - - public static bool UpdateUserAvgRateStat( - CSteamID steamIDUser, - string pchName, - float flCountThisSession, - double dSessionLength) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_UpdateUserAvgRateStat(steamIDUser, pchName1, flCountThisSession, dSessionLength); - } - - public static bool SetUserAchievement(CSteamID steamIDUser, string pchName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_SetUserAchievement(steamIDUser, pchName1); - } - - public static bool ClearUserAchievement(CSteamID steamIDUser, string pchName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamGameServerStats_ClearUserAchievement(steamIDUser, pchName1); - } - - public static SteamAPICall_t StoreUserStats(CSteamID steamIDUser) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerStats_StoreUserStats(steamIDUser); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServerUGC.cs b/Src/SteamworksNET/SteamGameServerUGC.cs deleted file mode 100644 index ee8b6930..00000000 --- a/Src/SteamworksNET/SteamGameServerUGC.cs +++ /dev/null @@ -1,555 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServerUGC -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamGameServerUGC - { - public static UGCQueryHandle_t CreateQueryUserUGCRequest( - AccountID_t unAccountID, - EUserUGCList eListType, - EUGCMatchingUGCType eMatchingUGCType, - EUserUGCListSortOrder eSortOrder, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage) - { - InteropHelp.TestIfAvailableGameServer(); - return (UGCQueryHandle_t) NativeMethods.ISteamGameServerUGC_CreateQueryUserUGCRequest(unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage); - } - - public static UGCQueryHandle_t CreateQueryAllUGCRequest( - EUGCQuery eQueryType, - EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage) - { - InteropHelp.TestIfAvailableGameServer(); - return (UGCQueryHandle_t) NativeMethods.ISteamGameServerUGC_CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); - } - - public static UGCQueryHandle_t CreateQueryUGCDetailsRequest( - PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs) - { - InteropHelp.TestIfAvailableGameServer(); - return (UGCQueryHandle_t) NativeMethods.ISteamGameServerUGC_CreateQueryUGCDetailsRequest(pvecPublishedFileID, unNumPublishedFileIDs); - } - - public static SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_SendQueryUGCRequest(handle); - } - - public static bool GetQueryUGCResult( - UGCQueryHandle_t handle, - uint index, - out SteamUGCDetails_t pDetails) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetQueryUGCResult(handle, index, out pDetails); - } - - public static bool GetQueryUGCPreviewURL( - UGCQueryHandle_t handle, - uint index, - out string pchURL, - uint cchURLSize) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num = Marshal.AllocHGlobal((int) cchURLSize); - bool queryUgcPreviewUrl = NativeMethods.ISteamGameServerUGC_GetQueryUGCPreviewURL(handle, index, num, cchURLSize); - pchURL = queryUgcPreviewUrl ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return queryUgcPreviewUrl; - } - - public static bool GetQueryUGCMetadata( - UGCQueryHandle_t handle, - uint index, - out string pchMetadata, - uint cchMetadatasize) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num = Marshal.AllocHGlobal((int) cchMetadatasize); - bool queryUgcMetadata = NativeMethods.ISteamGameServerUGC_GetQueryUGCMetadata(handle, index, num, cchMetadatasize); - pchMetadata = queryUgcMetadata ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return queryUgcMetadata; - } - - public static bool GetQueryUGCChildren( - UGCQueryHandle_t handle, - uint index, - PublishedFileId_t[] pvecPublishedFileID, - uint cMaxEntries) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetQueryUGCChildren(handle, index, pvecPublishedFileID, cMaxEntries); - } - - public static bool GetQueryUGCStatistic( - UGCQueryHandle_t handle, - uint index, - EItemStatistic eStatType, - out ulong pStatValue) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetQueryUGCStatistic(handle, index, eStatType, out pStatValue); - } - - public static uint GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint index) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetQueryUGCNumAdditionalPreviews(handle, index); - } - - public static bool GetQueryUGCAdditionalPreview( - UGCQueryHandle_t handle, - uint index, - uint previewIndex, - out string pchURLOrVideoID, - uint cchURLSize, - out string pchOriginalFileName, - uint cchOriginalFileNameSize, - out EItemPreviewType pPreviewType) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num1 = Marshal.AllocHGlobal((int) cchURLSize); - IntPtr num2 = Marshal.AllocHGlobal((int) cchOriginalFileNameSize); - bool additionalPreview = NativeMethods.ISteamGameServerUGC_GetQueryUGCAdditionalPreview(handle, index, previewIndex, num1, cchURLSize, num2, cchOriginalFileNameSize, out pPreviewType); - pchURLOrVideoID = additionalPreview ? InteropHelp.PtrToStringUTF8(num1) : (string) null; - Marshal.FreeHGlobal(num1); - pchOriginalFileName = additionalPreview ? InteropHelp.PtrToStringUTF8(num2) : (string) null; - Marshal.FreeHGlobal(num2); - return additionalPreview; - } - - public static uint GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint index) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetQueryUGCNumKeyValueTags(handle, index); - } - - public static bool GetQueryUGCKeyValueTag( - UGCQueryHandle_t handle, - uint index, - uint keyValueTagIndex, - out string pchKey, - uint cchKeySize, - out string pchValue, - uint cchValueSize) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num1 = Marshal.AllocHGlobal((int) cchKeySize); - IntPtr num2 = Marshal.AllocHGlobal((int) cchValueSize); - bool queryUgcKeyValueTag = NativeMethods.ISteamGameServerUGC_GetQueryUGCKeyValueTag(handle, index, keyValueTagIndex, num1, cchKeySize, num2, cchValueSize); - pchKey = queryUgcKeyValueTag ? InteropHelp.PtrToStringUTF8(num1) : (string) null; - Marshal.FreeHGlobal(num1); - pchValue = queryUgcKeyValueTag ? InteropHelp.PtrToStringUTF8(num2) : (string) null; - Marshal.FreeHGlobal(num2); - return queryUgcKeyValueTag; - } - - public static bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_ReleaseQueryUGCRequest(handle); - } - - public static bool AddRequiredTag(UGCQueryHandle_t handle, string pTagName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pTagName1 = new InteropHelp.UTF8StringHandle(pTagName)) - return NativeMethods.ISteamGameServerUGC_AddRequiredTag(handle, pTagName1); - } - - public static bool AddExcludedTag(UGCQueryHandle_t handle, string pTagName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pTagName1 = new InteropHelp.UTF8StringHandle(pTagName)) - return NativeMethods.ISteamGameServerUGC_AddExcludedTag(handle, pTagName1); - } - - public static bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnOnlyIDs(handle, bReturnOnlyIDs); - } - - public static bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnKeyValueTags(handle, bReturnKeyValueTags); - } - - public static bool SetReturnLongDescription( - UGCQueryHandle_t handle, - bool bReturnLongDescription) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnLongDescription(handle, bReturnLongDescription); - } - - public static bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnMetadata(handle, bReturnMetadata); - } - - public static bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnChildren(handle, bReturnChildren); - } - - public static bool SetReturnAdditionalPreviews( - UGCQueryHandle_t handle, - bool bReturnAdditionalPreviews) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnAdditionalPreviews(handle, bReturnAdditionalPreviews); - } - - public static bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetReturnTotalOnly(handle, bReturnTotalOnly); - } - - public static bool SetLanguage(UGCQueryHandle_t handle, string pchLanguage) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchLanguage1 = new InteropHelp.UTF8StringHandle(pchLanguage)) - return NativeMethods.ISteamGameServerUGC_SetLanguage(handle, pchLanguage1); - } - - public static bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint unMaxAgeSeconds) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetAllowCachedResponse(handle, unMaxAgeSeconds); - } - - public static bool SetCloudFileNameFilter(UGCQueryHandle_t handle, string pMatchCloudFileName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pMatchCloudFileName1 = new InteropHelp.UTF8StringHandle(pMatchCloudFileName)) - return NativeMethods.ISteamGameServerUGC_SetCloudFileNameFilter(handle, pMatchCloudFileName1); - } - - public static bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetMatchAnyTag(handle, bMatchAnyTag); - } - - public static bool SetSearchText(UGCQueryHandle_t handle, string pSearchText) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pSearchText1 = new InteropHelp.UTF8StringHandle(pSearchText)) - return NativeMethods.ISteamGameServerUGC_SetSearchText(handle, pSearchText1); - } - - public static bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint unDays) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetRankedByTrendDays(handle, unDays); - } - - public static bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, string pKey, string pValue) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pKey1 = new InteropHelp.UTF8StringHandle(pKey)) - { - using (InteropHelp.UTF8StringHandle pValue1 = new InteropHelp.UTF8StringHandle(pValue)) - return NativeMethods.ISteamGameServerUGC_AddRequiredKeyValueTag(handle, pKey1, pValue1); - } - } - - public static SteamAPICall_t RequestUGCDetails( - PublishedFileId_t nPublishedFileID, - uint unMaxAgeSeconds) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_RequestUGCDetails(nPublishedFileID, unMaxAgeSeconds); - } - - public static SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_CreateItem(nConsumerAppId, eFileType); - } - - public static UGCUpdateHandle_t StartItemUpdate( - AppId_t nConsumerAppId, - PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return (UGCUpdateHandle_t) NativeMethods.ISteamGameServerUGC_StartItemUpdate(nConsumerAppId, nPublishedFileID); - } - - public static bool SetItemTitle(UGCUpdateHandle_t handle, string pchTitle) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchTitle1 = new InteropHelp.UTF8StringHandle(pchTitle)) - return NativeMethods.ISteamGameServerUGC_SetItemTitle(handle, pchTitle1); - } - - public static bool SetItemDescription(UGCUpdateHandle_t handle, string pchDescription) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - return NativeMethods.ISteamGameServerUGC_SetItemDescription(handle, pchDescription1); - } - - public static bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, string pchLanguage) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchLanguage1 = new InteropHelp.UTF8StringHandle(pchLanguage)) - return NativeMethods.ISteamGameServerUGC_SetItemUpdateLanguage(handle, pchLanguage1); - } - - public static bool SetItemMetadata(UGCUpdateHandle_t handle, string pchMetaData) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchMetaData1 = new InteropHelp.UTF8StringHandle(pchMetaData)) - return NativeMethods.ISteamGameServerUGC_SetItemMetadata(handle, pchMetaData1); - } - - public static bool SetItemVisibility( - UGCUpdateHandle_t handle, - ERemoteStoragePublishedFileVisibility eVisibility) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetItemVisibility(handle, eVisibility); - } - - public static bool SetItemTags(UGCUpdateHandle_t updateHandle, IList pTags) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_SetItemTags(updateHandle, (IntPtr) new InteropHelp.SteamParamStringArray(pTags)); - } - - public static bool SetItemContent(UGCUpdateHandle_t handle, string pszContentFolder) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszContentFolder1 = new InteropHelp.UTF8StringHandle(pszContentFolder)) - return NativeMethods.ISteamGameServerUGC_SetItemContent(handle, pszContentFolder1); - } - - public static bool SetItemPreview(UGCUpdateHandle_t handle, string pszPreviewFile) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszPreviewFile1 = new InteropHelp.UTF8StringHandle(pszPreviewFile)) - return NativeMethods.ISteamGameServerUGC_SetItemPreview(handle, pszPreviewFile1); - } - - public static bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, string pchKey) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return NativeMethods.ISteamGameServerUGC_RemoveItemKeyValueTags(handle, pchKey1); - } - - public static bool AddItemKeyValueTag(UGCUpdateHandle_t handle, string pchKey, string pchValue) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - return NativeMethods.ISteamGameServerUGC_AddItemKeyValueTag(handle, pchKey1, pchValue1); - } - } - - public static bool AddItemPreviewFile( - UGCUpdateHandle_t handle, - string pszPreviewFile, - EItemPreviewType type) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszPreviewFile1 = new InteropHelp.UTF8StringHandle(pszPreviewFile)) - return NativeMethods.ISteamGameServerUGC_AddItemPreviewFile(handle, pszPreviewFile1, type); - } - - public static bool AddItemPreviewVideo(UGCUpdateHandle_t handle, string pszVideoID) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszVideoID1 = new InteropHelp.UTF8StringHandle(pszVideoID)) - return NativeMethods.ISteamGameServerUGC_AddItemPreviewVideo(handle, pszVideoID1); - } - - public static bool UpdateItemPreviewFile( - UGCUpdateHandle_t handle, - uint index, - string pszPreviewFile) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszPreviewFile1 = new InteropHelp.UTF8StringHandle(pszPreviewFile)) - return NativeMethods.ISteamGameServerUGC_UpdateItemPreviewFile(handle, index, pszPreviewFile1); - } - - public static bool UpdateItemPreviewVideo( - UGCUpdateHandle_t handle, - uint index, - string pszVideoID) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszVideoID1 = new InteropHelp.UTF8StringHandle(pszVideoID)) - return NativeMethods.ISteamGameServerUGC_UpdateItemPreviewVideo(handle, index, pszVideoID1); - } - - public static bool RemoveItemPreview(UGCUpdateHandle_t handle, uint index) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_RemoveItemPreview(handle, index); - } - - public static SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, string pchChangeNote) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchChangeNote1 = new InteropHelp.UTF8StringHandle(pchChangeNote)) - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_SubmitItemUpdate(handle, pchChangeNote1); - } - - public static EItemUpdateStatus GetItemUpdateProgress( - UGCUpdateHandle_t handle, - out ulong punBytesProcessed, - out ulong punBytesTotal) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetItemUpdateProgress(handle, out punBytesProcessed, out punBytesTotal); - } - - public static SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_SetUserItemVote(nPublishedFileID, bVoteUp); - } - - public static SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_GetUserItemVote(nPublishedFileID); - } - - public static SteamAPICall_t AddItemToFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_AddItemToFavorites(nAppId, nPublishedFileID); - } - - public static SteamAPICall_t RemoveItemFromFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_RemoveItemFromFavorites(nAppId, nPublishedFileID); - } - - public static SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_SubscribeItem(nPublishedFileID); - } - - public static SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_UnsubscribeItem(nPublishedFileID); - } - - public static uint GetNumSubscribedItems() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetNumSubscribedItems(); - } - - public static uint GetSubscribedItems(PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetSubscribedItems(pvecPublishedFileID, cMaxEntries); - } - - public static uint GetItemState(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetItemState(nPublishedFileID); - } - - public static bool GetItemInstallInfo( - PublishedFileId_t nPublishedFileID, - out ulong punSizeOnDisk, - out string pchFolder, - uint cchFolderSize, - out uint punTimeStamp) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num = Marshal.AllocHGlobal((int) cchFolderSize); - bool itemInstallInfo = NativeMethods.ISteamGameServerUGC_GetItemInstallInfo(nPublishedFileID, out punSizeOnDisk, num, cchFolderSize, out punTimeStamp); - pchFolder = itemInstallInfo ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return itemInstallInfo; - } - - public static bool GetItemDownloadInfo( - PublishedFileId_t nPublishedFileID, - out ulong punBytesDownloaded, - out ulong punBytesTotal) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_GetItemDownloadInfo(nPublishedFileID, out punBytesDownloaded, out punBytesTotal); - } - - public static bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUGC_DownloadItem(nPublishedFileID, bHighPriority); - } - - public static bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, string pszFolder) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pszFolder1 = new InteropHelp.UTF8StringHandle(pszFolder)) - return NativeMethods.ISteamGameServerUGC_BInitWorkshopForGameServer(unWorkshopDepotID, pszFolder1); - } - - public static void SuspendDownloads(bool bSuspend) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerUGC_SuspendDownloads(bSuspend); - } - - public static SteamAPICall_t StartPlaytimeTracking( - PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_StartPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs); - } - - public static SteamAPICall_t StopPlaytimeTracking( - PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs) - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_StopPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs); - } - - public static SteamAPICall_t StopPlaytimeTrackingForAllItems() - { - InteropHelp.TestIfAvailableGameServer(); - return (SteamAPICall_t) NativeMethods.ISteamGameServerUGC_StopPlaytimeTrackingForAllItems(); - } - } -} diff --git a/Src/SteamworksNET/SteamGameServerUtils.cs b/Src/SteamworksNET/SteamGameServerUtils.cs deleted file mode 100644 index 43f69367..00000000 --- a/Src/SteamworksNET/SteamGameServerUtils.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamGameServerUtils -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamGameServerUtils - { - public static uint GetSecondsSinceAppActive() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetSecondsSinceAppActive(); - } - - public static uint GetSecondsSinceComputerActive() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetSecondsSinceComputerActive(); - } - - public static EUniverse GetConnectedUniverse() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetConnectedUniverse(); - } - - public static uint GetServerRealTime() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetServerRealTime(); - } - - public static string GetIPCountry() - { - InteropHelp.TestIfAvailableGameServer(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamGameServerUtils_GetIPCountry()); - } - - public static bool GetImageSize(int iImage, out uint pnWidth, out uint pnHeight) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetImageSize(iImage, out pnWidth, out pnHeight); - } - - public static bool GetImageRGBA(int iImage, byte[] pubDest, int nDestBufferSize) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetImageRGBA(iImage, pubDest, nDestBufferSize); - } - - public static bool GetCSERIPPort(out uint unIP, out ushort usPort) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetCSERIPPort(out unIP, out usPort); - } - - public static byte GetCurrentBatteryPower() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetCurrentBatteryPower(); - } - - public static AppId_t GetAppID() - { - InteropHelp.TestIfAvailableGameServer(); - return (AppId_t) NativeMethods.ISteamGameServerUtils_GetAppID(); - } - - public static void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerUtils_SetOverlayNotificationPosition(eNotificationPosition); - } - - public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_IsAPICallCompleted(hSteamAPICall, out pbFailed); - } - - public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetAPICallFailureReason(hSteamAPICall); - } - - public static bool GetAPICallResult( - SteamAPICall_t hSteamAPICall, - IntPtr pCallback, - int cubCallback, - int iCallbackExpected, - out bool pbFailed) - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed); - } - - public static uint GetIPCCallCount() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetIPCCallCount(); - } - - public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerUtils_SetWarningMessageHook(pFunction); - } - - public static bool IsOverlayEnabled() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_IsOverlayEnabled(); - } - - public static bool BOverlayNeedsPresent() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_BOverlayNeedsPresent(); - } - - public static SteamAPICall_t CheckFileSignature(string szFileName) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle szFileName1 = new InteropHelp.UTF8StringHandle(szFileName)) - return (SteamAPICall_t) NativeMethods.ISteamGameServerUtils_CheckFileSignature(szFileName1); - } - - public static bool ShowGamepadTextInput( - EGamepadTextInputMode eInputMode, - EGamepadTextInputLineMode eLineInputMode, - string pchDescription, - uint unCharMax, - string pchExistingText) - { - InteropHelp.TestIfAvailableGameServer(); - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - { - using (InteropHelp.UTF8StringHandle pchExistingText1 = new InteropHelp.UTF8StringHandle(pchExistingText)) - return NativeMethods.ISteamGameServerUtils_ShowGamepadTextInput(eInputMode, eLineInputMode, pchDescription1, unCharMax, pchExistingText1); - } - } - - public static uint GetEnteredGamepadTextLength() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_GetEnteredGamepadTextLength(); - } - - public static bool GetEnteredGamepadTextInput(out string pchText, uint cchText) - { - InteropHelp.TestIfAvailableGameServer(); - IntPtr num = Marshal.AllocHGlobal((int) cchText); - bool gamepadTextInput = NativeMethods.ISteamGameServerUtils_GetEnteredGamepadTextInput(num, cchText); - pchText = gamepadTextInput ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return gamepadTextInput; - } - - public static string GetSteamUILanguage() - { - InteropHelp.TestIfAvailableGameServer(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamGameServerUtils_GetSteamUILanguage()); - } - - public static bool IsSteamRunningInVR() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_IsSteamRunningInVR(); - } - - public static void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset) - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerUtils_SetOverlayNotificationInset(nHorizontalInset, nVerticalInset); - } - - public static bool IsSteamInBigPictureMode() - { - InteropHelp.TestIfAvailableGameServer(); - return NativeMethods.ISteamGameServerUtils_IsSteamInBigPictureMode(); - } - - public static void StartVRDashboard() - { - InteropHelp.TestIfAvailableGameServer(); - NativeMethods.ISteamGameServerUtils_StartVRDashboard(); - } - } -} diff --git a/Src/SteamworksNET/SteamHTMLSurface.cs b/Src/SteamworksNET/SteamHTMLSurface.cs deleted file mode 100644 index 0d9fb362..00000000 --- a/Src/SteamworksNET/SteamHTMLSurface.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamHTMLSurface -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - public static class SteamHTMLSurface - { - public static bool Init() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTMLSurface_Init(); - } - - public static bool Shutdown() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTMLSurface_Shutdown(); - } - - public static SteamAPICall_t CreateBrowser(string pchUserAgent, string pchUserCSS) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchUserAgent1 = new InteropHelp.UTF8StringHandle(pchUserAgent)) - { - using (InteropHelp.UTF8StringHandle pchUserCSS1 = new InteropHelp.UTF8StringHandle(pchUserCSS)) - return (SteamAPICall_t) NativeMethods.ISteamHTMLSurface_CreateBrowser(pchUserAgent1, pchUserCSS1); - } - } - - public static void RemoveBrowser(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_RemoveBrowser(unBrowserHandle); - } - - public static void LoadURL(HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchURL1 = new InteropHelp.UTF8StringHandle(pchURL)) - { - using (InteropHelp.UTF8StringHandle pchPostData1 = new InteropHelp.UTF8StringHandle(pchPostData)) - NativeMethods.ISteamHTMLSurface_LoadURL(unBrowserHandle, pchURL1, pchPostData1); - } - } - - public static void SetSize(HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_SetSize(unBrowserHandle, unWidth, unHeight); - } - - public static void StopLoad(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_StopLoad(unBrowserHandle); - } - - public static void Reload(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_Reload(unBrowserHandle); - } - - public static void GoBack(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_GoBack(unBrowserHandle); - } - - public static void GoForward(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_GoForward(unBrowserHandle); - } - - public static void AddHeader(HHTMLBrowser unBrowserHandle, string pchKey, string pchValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - NativeMethods.ISteamHTMLSurface_AddHeader(unBrowserHandle, pchKey1, pchValue1); - } - } - - public static void ExecuteJavascript(HHTMLBrowser unBrowserHandle, string pchScript) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchScript1 = new InteropHelp.UTF8StringHandle(pchScript)) - NativeMethods.ISteamHTMLSurface_ExecuteJavascript(unBrowserHandle, pchScript1); - } - - public static void MouseUp(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_MouseUp(unBrowserHandle, eMouseButton); - } - - public static void MouseDown(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_MouseDown(unBrowserHandle, eMouseButton); - } - - public static void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_MouseDoubleClick(unBrowserHandle, eMouseButton); - } - - public static void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_MouseMove(unBrowserHandle, x, y); - } - - public static void MouseWheel(HHTMLBrowser unBrowserHandle, int nDelta) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_MouseWheel(unBrowserHandle, nDelta); - } - - public static void KeyDown( - HHTMLBrowser unBrowserHandle, - uint nNativeKeyCode, - EHTMLKeyModifiers eHTMLKeyModifiers) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_KeyDown(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); - } - - public static void KeyUp( - HHTMLBrowser unBrowserHandle, - uint nNativeKeyCode, - EHTMLKeyModifiers eHTMLKeyModifiers) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_KeyUp(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); - } - - public static void KeyChar( - HHTMLBrowser unBrowserHandle, - uint cUnicodeChar, - EHTMLKeyModifiers eHTMLKeyModifiers) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_KeyChar(unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers); - } - - public static void SetHorizontalScroll(HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_SetHorizontalScroll(unBrowserHandle, nAbsolutePixelScroll); - } - - public static void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_SetVerticalScroll(unBrowserHandle, nAbsolutePixelScroll); - } - - public static void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_SetKeyFocus(unBrowserHandle, bHasKeyFocus); - } - - public static void ViewSource(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_ViewSource(unBrowserHandle); - } - - public static void CopyToClipboard(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_CopyToClipboard(unBrowserHandle); - } - - public static void PasteFromClipboard(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_PasteFromClipboard(unBrowserHandle); - } - - public static void Find( - HHTMLBrowser unBrowserHandle, - string pchSearchStr, - bool bCurrentlyInFind, - bool bReverse) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchSearchStr1 = new InteropHelp.UTF8StringHandle(pchSearchStr)) - NativeMethods.ISteamHTMLSurface_Find(unBrowserHandle, pchSearchStr1, bCurrentlyInFind, bReverse); - } - - public static void StopFind(HHTMLBrowser unBrowserHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_StopFind(unBrowserHandle); - } - - public static void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_GetLinkAtPosition(unBrowserHandle, x, y); - } - - public static void SetCookie( - string pchHostname, - string pchKey, - string pchValue, - string pchPath = "/", - uint nExpires = 0, - bool bSecure = false, - bool bHTTPOnly = false) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchHostname1 = new InteropHelp.UTF8StringHandle(pchHostname)) - { - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - { - using (InteropHelp.UTF8StringHandle pchPath1 = new InteropHelp.UTF8StringHandle(pchPath)) - NativeMethods.ISteamHTMLSurface_SetCookie(pchHostname1, pchKey1, pchValue1, pchPath1, nExpires, bSecure, bHTTPOnly); - } - } - } - } - - public static void SetPageScaleFactor( - HHTMLBrowser unBrowserHandle, - float flZoom, - int nPointX, - int nPointY) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_SetPageScaleFactor(unBrowserHandle, flZoom, nPointX, nPointY); - } - - public static void SetBackgroundMode(HHTMLBrowser unBrowserHandle, bool bBackgroundMode) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_SetBackgroundMode(unBrowserHandle, bBackgroundMode); - } - - public static void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_AllowStartRequest(unBrowserHandle, bAllowed); - } - - public static void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_JSDialogResponse(unBrowserHandle, bResult); - } - - public static void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamHTMLSurface_FileLoadDialogResponse(unBrowserHandle, pchSelectedFiles); - } - } -} diff --git a/Src/SteamworksNET/SteamHTTP.cs b/Src/SteamworksNET/SteamHTTP.cs deleted file mode 100644 index 88f00aa9..00000000 --- a/Src/SteamworksNET/SteamHTTP.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamHTTP -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamHTTP - { - public static HTTPRequestHandle CreateHTTPRequest( - EHTTPMethod eHTTPRequestMethod, - string pchAbsoluteURL) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchAbsoluteURL1 = new InteropHelp.UTF8StringHandle(pchAbsoluteURL)) - return (HTTPRequestHandle) NativeMethods.ISteamHTTP_CreateHTTPRequest(eHTTPRequestMethod, pchAbsoluteURL1); - } - - public static bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, ulong ulContextValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SetHTTPRequestContextValue(hRequest, ulContextValue); - } - - public static bool SetHTTPRequestNetworkActivityTimeout( - HTTPRequestHandle hRequest, - uint unTimeoutSeconds) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SetHTTPRequestNetworkActivityTimeout(hRequest, unTimeoutSeconds); - } - - public static bool SetHTTPRequestHeaderValue( - HTTPRequestHandle hRequest, - string pchHeaderName, - string pchHeaderValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchHeaderName1 = new InteropHelp.UTF8StringHandle(pchHeaderName)) - { - using (InteropHelp.UTF8StringHandle pchHeaderValue1 = new InteropHelp.UTF8StringHandle(pchHeaderValue)) - return NativeMethods.ISteamHTTP_SetHTTPRequestHeaderValue(hRequest, pchHeaderName1, pchHeaderValue1); - } - } - - public static bool SetHTTPRequestGetOrPostParameter( - HTTPRequestHandle hRequest, - string pchParamName, - string pchParamValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchParamName1 = new InteropHelp.UTF8StringHandle(pchParamName)) - { - using (InteropHelp.UTF8StringHandle pchParamValue1 = new InteropHelp.UTF8StringHandle(pchParamValue)) - return NativeMethods.ISteamHTTP_SetHTTPRequestGetOrPostParameter(hRequest, pchParamName1, pchParamValue1); - } - } - - public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SendHTTPRequest(hRequest, out pCallHandle); - } - - public static bool SendHTTPRequestAndStreamResponse( - HTTPRequestHandle hRequest, - out SteamAPICall_t pCallHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SendHTTPRequestAndStreamResponse(hRequest, out pCallHandle); - } - - public static bool DeferHTTPRequest(HTTPRequestHandle hRequest) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_DeferHTTPRequest(hRequest); - } - - public static bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_PrioritizeHTTPRequest(hRequest); - } - - public static bool GetHTTPResponseHeaderSize( - HTTPRequestHandle hRequest, - string pchHeaderName, - out uint unResponseHeaderSize) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchHeaderName1 = new InteropHelp.UTF8StringHandle(pchHeaderName)) - return NativeMethods.ISteamHTTP_GetHTTPResponseHeaderSize(hRequest, pchHeaderName1, out unResponseHeaderSize); - } - - public static bool GetHTTPResponseHeaderValue( - HTTPRequestHandle hRequest, - string pchHeaderName, - byte[] pHeaderValueBuffer, - uint unBufferSize) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchHeaderName1 = new InteropHelp.UTF8StringHandle(pchHeaderName)) - return NativeMethods.ISteamHTTP_GetHTTPResponseHeaderValue(hRequest, pchHeaderName1, pHeaderValueBuffer, unBufferSize); - } - - public static bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, out uint unBodySize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_GetHTTPResponseBodySize(hRequest, out unBodySize); - } - - public static bool GetHTTPResponseBodyData( - HTTPRequestHandle hRequest, - byte[] pBodyDataBuffer, - uint unBufferSize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_GetHTTPResponseBodyData(hRequest, pBodyDataBuffer, unBufferSize); - } - - public static bool GetHTTPStreamingResponseBodyData( - HTTPRequestHandle hRequest, - uint cOffset, - byte[] pBodyDataBuffer, - uint unBufferSize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_GetHTTPStreamingResponseBodyData(hRequest, cOffset, pBodyDataBuffer, unBufferSize); - } - - public static bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_ReleaseHTTPRequest(hRequest); - } - - public static bool GetHTTPDownloadProgressPct( - HTTPRequestHandle hRequest, - out float pflPercentOut) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_GetHTTPDownloadProgressPct(hRequest, out pflPercentOut); - } - - public static bool SetHTTPRequestRawPostBody( - HTTPRequestHandle hRequest, - string pchContentType, - byte[] pubBody, - uint unBodyLen) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchContentType1 = new InteropHelp.UTF8StringHandle(pchContentType)) - return NativeMethods.ISteamHTTP_SetHTTPRequestRawPostBody(hRequest, pchContentType1, pubBody, unBodyLen); - } - - public static HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify) - { - InteropHelp.TestIfAvailableClient(); - return (HTTPCookieContainerHandle) NativeMethods.ISteamHTTP_CreateCookieContainer(bAllowResponsesToModify); - } - - public static bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_ReleaseCookieContainer(hCookieContainer); - } - - public static bool SetCookie( - HTTPCookieContainerHandle hCookieContainer, - string pchHost, - string pchUrl, - string pchCookie) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchHost1 = new InteropHelp.UTF8StringHandle(pchHost)) - { - using (InteropHelp.UTF8StringHandle pchUrl1 = new InteropHelp.UTF8StringHandle(pchUrl)) - { - using (InteropHelp.UTF8StringHandle pchCookie1 = new InteropHelp.UTF8StringHandle(pchCookie)) - return NativeMethods.ISteamHTTP_SetCookie(hCookieContainer, pchHost1, pchUrl1, pchCookie1); - } - } - } - - public static bool SetHTTPRequestCookieContainer( - HTTPRequestHandle hRequest, - HTTPCookieContainerHandle hCookieContainer) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SetHTTPRequestCookieContainer(hRequest, hCookieContainer); - } - - public static bool SetHTTPRequestUserAgentInfo( - HTTPRequestHandle hRequest, - string pchUserAgentInfo) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchUserAgentInfo1 = new InteropHelp.UTF8StringHandle(pchUserAgentInfo)) - return NativeMethods.ISteamHTTP_SetHTTPRequestUserAgentInfo(hRequest, pchUserAgentInfo1); - } - - public static bool SetHTTPRequestRequiresVerifiedCertificate( - HTTPRequestHandle hRequest, - bool bRequireVerifiedCertificate) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(hRequest, bRequireVerifiedCertificate); - } - - public static bool SetHTTPRequestAbsoluteTimeoutMS( - HTTPRequestHandle hRequest, - uint unMilliseconds) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(hRequest, unMilliseconds); - } - - public static bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, out bool pbWasTimedOut) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamHTTP_GetHTTPRequestWasTimedOut(hRequest, out pbWasTimedOut); - } - } -} diff --git a/Src/SteamworksNET/SteamInventory.cs b/Src/SteamworksNET/SteamInventory.cs deleted file mode 100644 index 28fb7002..00000000 --- a/Src/SteamworksNET/SteamInventory.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamInventory -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamInventory - { - public static EResult GetResultStatus(SteamInventoryResult_t resultHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetResultStatus(resultHandle); - } - - public static bool GetResultItems( - SteamInventoryResult_t resultHandle, - SteamItemDetails_t[] pOutItemsArray, - ref uint punOutItemsArraySize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetResultItems(resultHandle, pOutItemsArray, ref punOutItemsArraySize); - } - - public static uint GetResultTimestamp(SteamInventoryResult_t resultHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetResultTimestamp(resultHandle); - } - - public static bool CheckResultSteamID( - SteamInventoryResult_t resultHandle, - CSteamID steamIDExpected) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_CheckResultSteamID(resultHandle, steamIDExpected); - } - - public static void DestroyResult(SteamInventoryResult_t resultHandle) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamInventory_DestroyResult(resultHandle); - } - - public static bool GetAllItems(out SteamInventoryResult_t pResultHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetAllItems(out pResultHandle); - } - - public static bool GetItemsByID( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t[] pInstanceIDs, - uint unCountInstanceIDs) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetItemsByID(out pResultHandle, pInstanceIDs, unCountInstanceIDs); - } - - public static bool SerializeResult( - SteamInventoryResult_t resultHandle, - byte[] pOutBuffer, - out uint punOutBufferSize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_SerializeResult(resultHandle, pOutBuffer, out punOutBufferSize); - } - - public static bool DeserializeResult( - out SteamInventoryResult_t pOutResultHandle, - byte[] pBuffer, - uint unBufferSize, - bool bRESERVED_MUST_BE_FALSE = false) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_DeserializeResult(out pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE); - } - - public static bool GenerateItems( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t[] pArrayItemDefs, - uint[] punArrayQuantity, - uint unArrayLength) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GenerateItems(out pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength); - } - - public static bool GrantPromoItems(out SteamInventoryResult_t pResultHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GrantPromoItems(out pResultHandle); - } - - public static bool AddPromoItem( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t itemDef) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_AddPromoItem(out pResultHandle, itemDef); - } - - public static bool AddPromoItems( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t[] pArrayItemDefs, - uint unArrayLength) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_AddPromoItems(out pResultHandle, pArrayItemDefs, unArrayLength); - } - - public static bool ConsumeItem( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemConsume, - uint unQuantity) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_ConsumeItem(out pResultHandle, itemConsume, unQuantity); - } - - public static bool ExchangeItems( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t[] pArrayGenerate, - uint[] punArrayGenerateQuantity, - uint unArrayGenerateLength, - SteamItemInstanceID_t[] pArrayDestroy, - uint[] punArrayDestroyQuantity, - uint unArrayDestroyLength) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_ExchangeItems(out pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength); - } - - public static bool TransferItemQuantity( - out SteamInventoryResult_t pResultHandle, - SteamItemInstanceID_t itemIdSource, - uint unQuantity, - SteamItemInstanceID_t itemIdDest) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_TransferItemQuantity(out pResultHandle, itemIdSource, unQuantity, itemIdDest); - } - - public static void SendItemDropHeartbeat() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamInventory_SendItemDropHeartbeat(); - } - - public static bool TriggerItemDrop( - out SteamInventoryResult_t pResultHandle, - SteamItemDef_t dropListDefinition) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_TriggerItemDrop(out pResultHandle, dropListDefinition); - } - - public static bool TradeItems( - out SteamInventoryResult_t pResultHandle, - CSteamID steamIDTradePartner, - SteamItemInstanceID_t[] pArrayGive, - uint[] pArrayGiveQuantity, - uint nArrayGiveLength, - SteamItemInstanceID_t[] pArrayGet, - uint[] pArrayGetQuantity, - uint nArrayGetLength) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_TradeItems(out pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength); - } - - public static bool LoadItemDefinitions() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_LoadItemDefinitions(); - } - - public static bool GetItemDefinitionIDs( - SteamItemDef_t[] pItemDefIDs, - out uint punItemDefIDsArraySize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetItemDefinitionIDs(pItemDefIDs, out punItemDefIDsArraySize); - } - - public static bool GetItemDefinitionProperty( - SteamItemDef_t iDefinition, - string pchPropertyName, - out string pchValueBuffer, - ref uint punValueBufferSizeOut) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) punValueBufferSizeOut); - using (InteropHelp.UTF8StringHandle pchPropertyName1 = new InteropHelp.UTF8StringHandle(pchPropertyName)) - { - bool definitionProperty = NativeMethods.ISteamInventory_GetItemDefinitionProperty(iDefinition, pchPropertyName1, num, ref punValueBufferSizeOut); - pchValueBuffer = definitionProperty ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return definitionProperty; - } - } - - public static SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(steamID); - } - - public static bool GetEligiblePromoItemDefinitionIDs( - CSteamID steamID, - SteamItemDef_t[] pItemDefIDs, - ref uint punItemDefIDsArraySize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamInventory_GetEligiblePromoItemDefinitionIDs(steamID, pItemDefIDs, ref punItemDefIDsArraySize); - } - } -} diff --git a/Src/SteamworksNET/SteamInventoryDefinitionUpdate_t.cs b/Src/SteamworksNET/SteamInventoryDefinitionUpdate_t.cs deleted file mode 100644 index 11d5062b..00000000 --- a/Src/SteamworksNET/SteamInventoryDefinitionUpdate_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamInventoryDefinitionUpdate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4702)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct SteamInventoryDefinitionUpdate_t - { - public const int k_iCallback = 4702; - } -} diff --git a/Src/SteamworksNET/SteamInventoryEligiblePromoItemDefIDs_t.cs b/Src/SteamworksNET/SteamInventoryEligiblePromoItemDefIDs_t.cs deleted file mode 100644 index b588b1c5..00000000 --- a/Src/SteamworksNET/SteamInventoryEligiblePromoItemDefIDs_t.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamInventoryEligiblePromoItemDefIDs_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4703)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamInventoryEligiblePromoItemDefIDs_t - { - public const int k_iCallback = 4703; - public EResult m_result; - public CSteamID m_steamID; - public int m_numEligiblePromoItemDefs; - [MarshalAs(UnmanagedType.I1)] - public bool m_bCachedData; - } -} diff --git a/Src/SteamworksNET/SteamInventoryFullUpdate_t.cs b/Src/SteamworksNET/SteamInventoryFullUpdate_t.cs deleted file mode 100644 index 1d91d064..00000000 --- a/Src/SteamworksNET/SteamInventoryFullUpdate_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamInventoryFullUpdate_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4701)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamInventoryFullUpdate_t - { - public const int k_iCallback = 4701; - public SteamInventoryResult_t m_handle; - } -} diff --git a/Src/SteamworksNET/SteamInventoryResultReady_t.cs b/Src/SteamworksNET/SteamInventoryResultReady_t.cs deleted file mode 100644 index 30899a71..00000000 --- a/Src/SteamworksNET/SteamInventoryResultReady_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamInventoryResultReady_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4700)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamInventoryResultReady_t - { - public const int k_iCallback = 4700; - public SteamInventoryResult_t m_handle; - public EResult m_result; - } -} diff --git a/Src/SteamworksNET/SteamInventoryResult_t.cs b/Src/SteamworksNET/SteamInventoryResult_t.cs deleted file mode 100644 index 16db7af8..00000000 --- a/Src/SteamworksNET/SteamInventoryResult_t.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamInventoryResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SteamInventoryResult_t : - IEquatable, - IComparable - { - public static readonly SteamInventoryResult_t Invalid = new SteamInventoryResult_t(-1); - public int m_SteamInventoryResult; - - public SteamInventoryResult_t(int value) => this.m_SteamInventoryResult = value; - - public override string ToString() => this.m_SteamInventoryResult.ToString(); - - public override bool Equals(object other) => other is SteamInventoryResult_t inventoryResultT && this == inventoryResultT; - - public override int GetHashCode() => this.m_SteamInventoryResult.GetHashCode(); - - public static bool operator ==(SteamInventoryResult_t x, SteamInventoryResult_t y) => x.m_SteamInventoryResult == y.m_SteamInventoryResult; - - public static bool operator !=(SteamInventoryResult_t x, SteamInventoryResult_t y) => !(x == y); - - public static explicit operator SteamInventoryResult_t(int value) => new SteamInventoryResult_t(value); - - public static explicit operator int(SteamInventoryResult_t that) => that.m_SteamInventoryResult; - - public bool Equals(SteamInventoryResult_t other) => this.m_SteamInventoryResult == other.m_SteamInventoryResult; - - public int CompareTo(SteamInventoryResult_t other) => this.m_SteamInventoryResult.CompareTo(other.m_SteamInventoryResult); - } -} diff --git a/Src/SteamworksNET/SteamItemDef_t.cs b/Src/SteamworksNET/SteamItemDef_t.cs deleted file mode 100644 index 33b65d74..00000000 --- a/Src/SteamworksNET/SteamItemDef_t.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamItemDef_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SteamItemDef_t : IEquatable, IComparable - { - public int m_SteamItemDef; - - public SteamItemDef_t(int value) => this.m_SteamItemDef = value; - - public override string ToString() => this.m_SteamItemDef.ToString(); - - public override bool Equals(object other) => other is SteamItemDef_t steamItemDefT && this == steamItemDefT; - - public override int GetHashCode() => this.m_SteamItemDef.GetHashCode(); - - public static bool operator ==(SteamItemDef_t x, SteamItemDef_t y) => x.m_SteamItemDef == y.m_SteamItemDef; - - public static bool operator !=(SteamItemDef_t x, SteamItemDef_t y) => !(x == y); - - public static explicit operator SteamItemDef_t(int value) => new SteamItemDef_t(value); - - public static explicit operator int(SteamItemDef_t that) => that.m_SteamItemDef; - - public bool Equals(SteamItemDef_t other) => this.m_SteamItemDef == other.m_SteamItemDef; - - public int CompareTo(SteamItemDef_t other) => this.m_SteamItemDef.CompareTo(other.m_SteamItemDef); - } -} diff --git a/Src/SteamworksNET/SteamItemDetails_t.cs b/Src/SteamworksNET/SteamItemDetails_t.cs deleted file mode 100644 index f09e96a0..00000000 --- a/Src/SteamworksNET/SteamItemDetails_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamItemDetails_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamItemDetails_t - { - public SteamItemInstanceID_t m_itemId; - public SteamItemDef_t m_iDefinition; - public ushort m_unQuantity; - public ushort m_unFlags; - } -} diff --git a/Src/SteamworksNET/SteamItemInstanceID_t.cs b/Src/SteamworksNET/SteamItemInstanceID_t.cs deleted file mode 100644 index f160ecc8..00000000 --- a/Src/SteamworksNET/SteamItemInstanceID_t.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamItemInstanceID_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SteamItemInstanceID_t : - IEquatable, - IComparable - { - public static readonly SteamItemInstanceID_t Invalid = new SteamItemInstanceID_t(ulong.MaxValue); - public ulong m_SteamItemInstanceID; - - public SteamItemInstanceID_t(ulong value) => this.m_SteamItemInstanceID = value; - - public override string ToString() => this.m_SteamItemInstanceID.ToString(); - - public override bool Equals(object other) => other is SteamItemInstanceID_t steamItemInstanceIdT && this == steamItemInstanceIdT; - - public override int GetHashCode() => this.m_SteamItemInstanceID.GetHashCode(); - - public static bool operator ==(SteamItemInstanceID_t x, SteamItemInstanceID_t y) => (long) x.m_SteamItemInstanceID == (long) y.m_SteamItemInstanceID; - - public static bool operator !=(SteamItemInstanceID_t x, SteamItemInstanceID_t y) => !(x == y); - - public static explicit operator SteamItemInstanceID_t(ulong value) => new SteamItemInstanceID_t(value); - - public static explicit operator ulong(SteamItemInstanceID_t that) => that.m_SteamItemInstanceID; - - public bool Equals(SteamItemInstanceID_t other) => (long) this.m_SteamItemInstanceID == (long) other.m_SteamItemInstanceID; - - public int CompareTo(SteamItemInstanceID_t other) => this.m_SteamItemInstanceID.CompareTo(other.m_SteamItemInstanceID); - } -} diff --git a/Src/SteamworksNET/SteamLeaderboardEntries_t.cs b/Src/SteamworksNET/SteamLeaderboardEntries_t.cs deleted file mode 100644 index 58f0d2b0..00000000 --- a/Src/SteamworksNET/SteamLeaderboardEntries_t.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamLeaderboardEntries_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SteamLeaderboardEntries_t : - IEquatable, - IComparable - { - public ulong m_SteamLeaderboardEntries; - - public SteamLeaderboardEntries_t(ulong value) => this.m_SteamLeaderboardEntries = value; - - public override string ToString() => this.m_SteamLeaderboardEntries.ToString(); - - public override bool Equals(object other) => other is SteamLeaderboardEntries_t leaderboardEntriesT && this == leaderboardEntriesT; - - public override int GetHashCode() => this.m_SteamLeaderboardEntries.GetHashCode(); - - public static bool operator ==(SteamLeaderboardEntries_t x, SteamLeaderboardEntries_t y) => (long) x.m_SteamLeaderboardEntries == (long) y.m_SteamLeaderboardEntries; - - public static bool operator !=(SteamLeaderboardEntries_t x, SteamLeaderboardEntries_t y) => !(x == y); - - public static explicit operator SteamLeaderboardEntries_t(ulong value) => new SteamLeaderboardEntries_t(value); - - public static explicit operator ulong(SteamLeaderboardEntries_t that) => that.m_SteamLeaderboardEntries; - - public bool Equals(SteamLeaderboardEntries_t other) => (long) this.m_SteamLeaderboardEntries == (long) other.m_SteamLeaderboardEntries; - - public int CompareTo(SteamLeaderboardEntries_t other) => this.m_SteamLeaderboardEntries.CompareTo(other.m_SteamLeaderboardEntries); - } -} diff --git a/Src/SteamworksNET/SteamLeaderboard_t.cs b/Src/SteamworksNET/SteamLeaderboard_t.cs deleted file mode 100644 index 6fa3a4d7..00000000 --- a/Src/SteamworksNET/SteamLeaderboard_t.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamLeaderboard_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct SteamLeaderboard_t : IEquatable, IComparable - { - public ulong m_SteamLeaderboard; - - public SteamLeaderboard_t(ulong value) => this.m_SteamLeaderboard = value; - - public override string ToString() => this.m_SteamLeaderboard.ToString(); - - public override bool Equals(object other) => other is SteamLeaderboard_t steamLeaderboardT && this == steamLeaderboardT; - - public override int GetHashCode() => this.m_SteamLeaderboard.GetHashCode(); - - public static bool operator ==(SteamLeaderboard_t x, SteamLeaderboard_t y) => (long) x.m_SteamLeaderboard == (long) y.m_SteamLeaderboard; - - public static bool operator !=(SteamLeaderboard_t x, SteamLeaderboard_t y) => !(x == y); - - public static explicit operator SteamLeaderboard_t(ulong value) => new SteamLeaderboard_t(value); - - public static explicit operator ulong(SteamLeaderboard_t that) => that.m_SteamLeaderboard; - - public bool Equals(SteamLeaderboard_t other) => (long) this.m_SteamLeaderboard == (long) other.m_SteamLeaderboard; - - public int CompareTo(SteamLeaderboard_t other) => this.m_SteamLeaderboard.CompareTo(other.m_SteamLeaderboard); - } -} diff --git a/Src/SteamworksNET/SteamMatchmaking.cs b/Src/SteamworksNET/SteamMatchmaking.cs deleted file mode 100644 index 1f117e5d..00000000 --- a/Src/SteamworksNET/SteamMatchmaking.cs +++ /dev/null @@ -1,315 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamMatchmaking -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamMatchmaking - { - public static int GetFavoriteGameCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetFavoriteGameCount(); - } - - public static bool GetFavoriteGame( - int iGame, - out AppId_t pnAppID, - out uint pnIP, - out ushort pnConnPort, - out ushort pnQueryPort, - out uint punFlags, - out uint pRTime32LastPlayedOnServer) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetFavoriteGame(iGame, out pnAppID, out pnIP, out pnConnPort, out pnQueryPort, out punFlags, out pRTime32LastPlayedOnServer); - } - - public static int AddFavoriteGame( - AppId_t nAppID, - uint nIP, - ushort nConnPort, - ushort nQueryPort, - uint unFlags, - uint rTime32LastPlayedOnServer) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_AddFavoriteGame(nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer); - } - - public static bool RemoveFavoriteGame( - AppId_t nAppID, - uint nIP, - ushort nConnPort, - ushort nQueryPort, - uint unFlags) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_RemoveFavoriteGame(nAppID, nIP, nConnPort, nQueryPort, unFlags); - } - - public static SteamAPICall_t RequestLobbyList() - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamMatchmaking_RequestLobbyList(); - } - - public static void AddRequestLobbyListStringFilter( - string pchKeyToMatch, - string pchValueToMatch, - ELobbyComparison eComparisonType) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKeyToMatch1 = new InteropHelp.UTF8StringHandle(pchKeyToMatch)) - { - using (InteropHelp.UTF8StringHandle pchValueToMatch1 = new InteropHelp.UTF8StringHandle(pchValueToMatch)) - NativeMethods.ISteamMatchmaking_AddRequestLobbyListStringFilter(pchKeyToMatch1, pchValueToMatch1, eComparisonType); - } - } - - public static void AddRequestLobbyListNumericalFilter( - string pchKeyToMatch, - int nValueToMatch, - ELobbyComparison eComparisonType) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKeyToMatch1 = new InteropHelp.UTF8StringHandle(pchKeyToMatch)) - NativeMethods.ISteamMatchmaking_AddRequestLobbyListNumericalFilter(pchKeyToMatch1, nValueToMatch, eComparisonType); - } - - public static void AddRequestLobbyListNearValueFilter( - string pchKeyToMatch, - int nValueToBeCloseTo) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKeyToMatch1 = new InteropHelp.UTF8StringHandle(pchKeyToMatch)) - NativeMethods.ISteamMatchmaking_AddRequestLobbyListNearValueFilter(pchKeyToMatch1, nValueToBeCloseTo); - } - - public static void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable(nSlotsAvailable); - } - - public static void AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter eLobbyDistanceFilter) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmaking_AddRequestLobbyListDistanceFilter(eLobbyDistanceFilter); - } - - public static void AddRequestLobbyListResultCountFilter(int cMaxResults) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmaking_AddRequestLobbyListResultCountFilter(cMaxResults); - } - - public static void AddRequestLobbyListCompatibleMembersFilter(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter(steamIDLobby); - } - - public static CSteamID GetLobbyByIndex(int iLobby) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamMatchmaking_GetLobbyByIndex(iLobby); - } - - public static SteamAPICall_t CreateLobby(ELobbyType eLobbyType, int cMaxMembers) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamMatchmaking_CreateLobby(eLobbyType, cMaxMembers); - } - - public static SteamAPICall_t JoinLobby(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamMatchmaking_JoinLobby(steamIDLobby); - } - - public static void LeaveLobby(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmaking_LeaveLobby(steamIDLobby); - } - - public static bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_InviteUserToLobby(steamIDLobby, steamIDInvitee); - } - - public static int GetNumLobbyMembers(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetNumLobbyMembers(steamIDLobby); - } - - public static CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamMatchmaking_GetLobbyMemberByIndex(steamIDLobby, iMember); - } - - public static string GetLobbyData(CSteamID steamIDLobby, string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamMatchmaking_GetLobbyData(steamIDLobby, pchKey1)); - } - - public static bool SetLobbyData(CSteamID steamIDLobby, string pchKey, string pchValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - return NativeMethods.ISteamMatchmaking_SetLobbyData(steamIDLobby, pchKey1, pchValue1); - } - } - - public static int GetLobbyDataCount(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetLobbyDataCount(steamIDLobby); - } - - public static bool GetLobbyDataByIndex( - CSteamID steamIDLobby, - int iLobbyData, - out string pchKey, - int cchKeyBufferSize, - out string pchValue, - int cchValueBufferSize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num1 = Marshal.AllocHGlobal(cchKeyBufferSize); - IntPtr num2 = Marshal.AllocHGlobal(cchValueBufferSize); - bool lobbyDataByIndex = NativeMethods.ISteamMatchmaking_GetLobbyDataByIndex(steamIDLobby, iLobbyData, num1, cchKeyBufferSize, num2, cchValueBufferSize); - pchKey = lobbyDataByIndex ? InteropHelp.PtrToStringUTF8(num1) : (string) null; - Marshal.FreeHGlobal(num1); - pchValue = lobbyDataByIndex ? InteropHelp.PtrToStringUTF8(num2) : (string) null; - Marshal.FreeHGlobal(num2); - return lobbyDataByIndex; - } - - public static bool DeleteLobbyData(CSteamID steamIDLobby, string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return NativeMethods.ISteamMatchmaking_DeleteLobbyData(steamIDLobby, pchKey1); - } - - public static string GetLobbyMemberData( - CSteamID steamIDLobby, - CSteamID steamIDUser, - string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamMatchmaking_GetLobbyMemberData(steamIDLobby, steamIDUser, pchKey1)); - } - - public static void SetLobbyMemberData(CSteamID steamIDLobby, string pchKey, string pchValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - NativeMethods.ISteamMatchmaking_SetLobbyMemberData(steamIDLobby, pchKey1, pchValue1); - } - } - - public static bool SendLobbyChatMsg(CSteamID steamIDLobby, byte[] pvMsgBody, int cubMsgBody) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_SendLobbyChatMsg(steamIDLobby, pvMsgBody, cubMsgBody); - } - - public static int GetLobbyChatEntry( - CSteamID steamIDLobby, - int iChatID, - out CSteamID pSteamIDUser, - byte[] pvData, - int cubData, - out EChatEntryType peChatEntryType) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetLobbyChatEntry(steamIDLobby, iChatID, out pSteamIDUser, pvData, cubData, out peChatEntryType); - } - - public static bool RequestLobbyData(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_RequestLobbyData(steamIDLobby); - } - - public static void SetLobbyGameServer( - CSteamID steamIDLobby, - uint unGameServerIP, - ushort unGameServerPort, - CSteamID steamIDGameServer) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmaking_SetLobbyGameServer(steamIDLobby, unGameServerIP, unGameServerPort, steamIDGameServer); - } - - public static bool GetLobbyGameServer( - CSteamID steamIDLobby, - out uint punGameServerIP, - out ushort punGameServerPort, - out CSteamID psteamIDGameServer) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetLobbyGameServer(steamIDLobby, out punGameServerIP, out punGameServerPort, out psteamIDGameServer); - } - - public static bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_SetLobbyMemberLimit(steamIDLobby, cMaxMembers); - } - - public static int GetLobbyMemberLimit(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_GetLobbyMemberLimit(steamIDLobby); - } - - public static bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_SetLobbyType(steamIDLobby, eLobbyType); - } - - public static bool SetLobbyJoinable(CSteamID steamIDLobby, bool bLobbyJoinable) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_SetLobbyJoinable(steamIDLobby, bLobbyJoinable); - } - - public static CSteamID GetLobbyOwner(CSteamID steamIDLobby) - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamMatchmaking_GetLobbyOwner(steamIDLobby); - } - - public static bool SetLobbyOwner(CSteamID steamIDLobby, CSteamID steamIDNewOwner) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_SetLobbyOwner(steamIDLobby, steamIDNewOwner); - } - - public static bool SetLinkedLobby(CSteamID steamIDLobby, CSteamID steamIDLobbyDependent) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmaking_SetLinkedLobby(steamIDLobby, steamIDLobbyDependent); - } - } -} diff --git a/Src/SteamworksNET/SteamMatchmakingServers.cs b/Src/SteamworksNET/SteamMatchmakingServers.cs deleted file mode 100644 index 2e1247c9..00000000 --- a/Src/SteamworksNET/SteamMatchmakingServers.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamMatchmakingServers -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamMatchmakingServers - { - public static HServerListRequest RequestInternetServerList( - AppId_t iApp, - MatchMakingKeyValuePair_t[] ppchFilters, - uint nFilters, - ISteamMatchmakingServerListResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerListRequest) NativeMethods.ISteamMatchmakingServers_RequestInternetServerList(iApp, (IntPtr) new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr) pRequestServersResponse); - } - - public static HServerListRequest RequestLANServerList( - AppId_t iApp, - ISteamMatchmakingServerListResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerListRequest) NativeMethods.ISteamMatchmakingServers_RequestLANServerList(iApp, (IntPtr) pRequestServersResponse); - } - - public static HServerListRequest RequestFriendsServerList( - AppId_t iApp, - MatchMakingKeyValuePair_t[] ppchFilters, - uint nFilters, - ISteamMatchmakingServerListResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerListRequest) NativeMethods.ISteamMatchmakingServers_RequestFriendsServerList(iApp, (IntPtr) new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr) pRequestServersResponse); - } - - public static HServerListRequest RequestFavoritesServerList( - AppId_t iApp, - MatchMakingKeyValuePair_t[] ppchFilters, - uint nFilters, - ISteamMatchmakingServerListResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerListRequest) NativeMethods.ISteamMatchmakingServers_RequestFavoritesServerList(iApp, (IntPtr) new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr) pRequestServersResponse); - } - - public static HServerListRequest RequestHistoryServerList( - AppId_t iApp, - MatchMakingKeyValuePair_t[] ppchFilters, - uint nFilters, - ISteamMatchmakingServerListResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerListRequest) NativeMethods.ISteamMatchmakingServers_RequestHistoryServerList(iApp, (IntPtr) new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr) pRequestServersResponse); - } - - public static HServerListRequest RequestSpectatorServerList( - AppId_t iApp, - MatchMakingKeyValuePair_t[] ppchFilters, - uint nFilters, - ISteamMatchmakingServerListResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerListRequest) NativeMethods.ISteamMatchmakingServers_RequestSpectatorServerList(iApp, (IntPtr) new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr) pRequestServersResponse); - } - - public static void ReleaseRequest(HServerListRequest hServerListRequest) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmakingServers_ReleaseRequest(hServerListRequest); - } - - public static gameserveritem_t GetServerDetails(HServerListRequest hRequest, int iServer) - { - InteropHelp.TestIfAvailableClient(); - return (gameserveritem_t) Marshal.PtrToStructure(NativeMethods.ISteamMatchmakingServers_GetServerDetails(hRequest, iServer), typeof (gameserveritem_t)); - } - - public static void CancelQuery(HServerListRequest hRequest) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmakingServers_CancelQuery(hRequest); - } - - public static void RefreshQuery(HServerListRequest hRequest) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmakingServers_RefreshQuery(hRequest); - } - - public static bool IsRefreshing(HServerListRequest hRequest) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmakingServers_IsRefreshing(hRequest); - } - - public static int GetServerCount(HServerListRequest hRequest) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMatchmakingServers_GetServerCount(hRequest); - } - - public static void RefreshServer(HServerListRequest hRequest, int iServer) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmakingServers_RefreshServer(hRequest, iServer); - } - - public static HServerQuery PingServer( - uint unIP, - ushort usPort, - ISteamMatchmakingPingResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerQuery) NativeMethods.ISteamMatchmakingServers_PingServer(unIP, usPort, (IntPtr) pRequestServersResponse); - } - - public static HServerQuery PlayerDetails( - uint unIP, - ushort usPort, - ISteamMatchmakingPlayersResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerQuery) NativeMethods.ISteamMatchmakingServers_PlayerDetails(unIP, usPort, (IntPtr) pRequestServersResponse); - } - - public static HServerQuery ServerRules( - uint unIP, - ushort usPort, - ISteamMatchmakingRulesResponse pRequestServersResponse) - { - InteropHelp.TestIfAvailableClient(); - return (HServerQuery) NativeMethods.ISteamMatchmakingServers_ServerRules(unIP, usPort, (IntPtr) pRequestServersResponse); - } - - public static void CancelServerQuery(HServerQuery hServerQuery) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMatchmakingServers_CancelServerQuery(hServerQuery); - } - } -} diff --git a/Src/SteamworksNET/SteamMusic.cs b/Src/SteamworksNET/SteamMusic.cs deleted file mode 100644 index 95311add..00000000 --- a/Src/SteamworksNET/SteamMusic.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamMusic -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamMusic - { - public static bool BIsEnabled() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusic_BIsEnabled(); - } - - public static bool BIsPlaying() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusic_BIsPlaying(); - } - - public static AudioPlayback_Status GetPlaybackStatus() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusic_GetPlaybackStatus(); - } - - public static void Play() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMusic_Play(); - } - - public static void Pause() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMusic_Pause(); - } - - public static void PlayPrevious() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMusic_PlayPrevious(); - } - - public static void PlayNext() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMusic_PlayNext(); - } - - public static void SetVolume(float flVolume) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamMusic_SetVolume(flVolume); - } - - public static float GetVolume() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusic_GetVolume(); - } - } -} diff --git a/Src/SteamworksNET/SteamMusicRemote.cs b/Src/SteamworksNET/SteamMusicRemote.cs deleted file mode 100644 index 51801b1e..00000000 --- a/Src/SteamworksNET/SteamMusicRemote.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamMusicRemote -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamMusicRemote - { - public static bool RegisterSteamMusicRemote(string pchName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamMusicRemote_RegisterSteamMusicRemote(pchName1); - } - - public static bool DeregisterSteamMusicRemote() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_DeregisterSteamMusicRemote(); - } - - public static bool BIsCurrentMusicRemote() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_BIsCurrentMusicRemote(); - } - - public static bool BActivationSuccess(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_BActivationSuccess(bValue); - } - - public static bool SetDisplayName(string pchDisplayName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchDisplayName1 = new InteropHelp.UTF8StringHandle(pchDisplayName)) - return NativeMethods.ISteamMusicRemote_SetDisplayName(pchDisplayName1); - } - - public static bool SetPNGIcon_64x64(byte[] pvBuffer, uint cbBufferLength) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_SetPNGIcon_64x64(pvBuffer, cbBufferLength); - } - - public static bool EnablePlayPrevious(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_EnablePlayPrevious(bValue); - } - - public static bool EnablePlayNext(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_EnablePlayNext(bValue); - } - - public static bool EnableShuffled(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_EnableShuffled(bValue); - } - - public static bool EnableLooped(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_EnableLooped(bValue); - } - - public static bool EnableQueue(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_EnableQueue(bValue); - } - - public static bool EnablePlaylists(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_EnablePlaylists(bValue); - } - - public static bool UpdatePlaybackStatus(AudioPlayback_Status nStatus) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_UpdatePlaybackStatus(nStatus); - } - - public static bool UpdateShuffled(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_UpdateShuffled(bValue); - } - - public static bool UpdateLooped(bool bValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_UpdateLooped(bValue); - } - - public static bool UpdateVolume(float flValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_UpdateVolume(flValue); - } - - public static bool CurrentEntryWillChange() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_CurrentEntryWillChange(); - } - - public static bool CurrentEntryIsAvailable(bool bAvailable) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_CurrentEntryIsAvailable(bAvailable); - } - - public static bool UpdateCurrentEntryText(string pchText) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchText1 = new InteropHelp.UTF8StringHandle(pchText)) - return NativeMethods.ISteamMusicRemote_UpdateCurrentEntryText(pchText1); - } - - public static bool UpdateCurrentEntryElapsedSeconds(int nValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds(nValue); - } - - public static bool UpdateCurrentEntryCoverArt(byte[] pvBuffer, uint cbBufferLength) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_UpdateCurrentEntryCoverArt(pvBuffer, cbBufferLength); - } - - public static bool CurrentEntryDidChange() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_CurrentEntryDidChange(); - } - - public static bool QueueWillChange() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_QueueWillChange(); - } - - public static bool ResetQueueEntries() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_ResetQueueEntries(); - } - - public static bool SetQueueEntry(int nID, int nPosition, string pchEntryText) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchEntryText1 = new InteropHelp.UTF8StringHandle(pchEntryText)) - return NativeMethods.ISteamMusicRemote_SetQueueEntry(nID, nPosition, pchEntryText1); - } - - public static bool SetCurrentQueueEntry(int nID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_SetCurrentQueueEntry(nID); - } - - public static bool QueueDidChange() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_QueueDidChange(); - } - - public static bool PlaylistWillChange() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_PlaylistWillChange(); - } - - public static bool ResetPlaylistEntries() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_ResetPlaylistEntries(); - } - - public static bool SetPlaylistEntry(int nID, int nPosition, string pchEntryText) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchEntryText1 = new InteropHelp.UTF8StringHandle(pchEntryText)) - return NativeMethods.ISteamMusicRemote_SetPlaylistEntry(nID, nPosition, pchEntryText1); - } - - public static bool SetCurrentPlaylistEntry(int nID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_SetCurrentPlaylistEntry(nID); - } - - public static bool PlaylistDidChange() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamMusicRemote_PlaylistDidChange(); - } - } -} diff --git a/Src/SteamworksNET/SteamNetworking.cs b/Src/SteamworksNET/SteamNetworking.cs deleted file mode 100644 index fd174ee5..00000000 --- a/Src/SteamworksNET/SteamNetworking.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamNetworking -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamNetworking - { - public static bool SendP2PPacket( - CSteamID steamIDRemote, - byte[] pubData, - uint cubData, - EP2PSend eP2PSendType, - int nChannel = 0) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_SendP2PPacket(steamIDRemote, pubData, cubData, eP2PSendType, nChannel); - } - - public static bool IsP2PPacketAvailable(out uint pcubMsgSize, int nChannel = 0) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_IsP2PPacketAvailable(out pcubMsgSize, nChannel); - } - - public static bool ReadP2PPacket( - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out CSteamID psteamIDRemote, - int nChannel = 0) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_ReadP2PPacket(pubDest, cubDest, out pcubMsgSize, out psteamIDRemote, nChannel); - } - - public static bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_AcceptP2PSessionWithUser(steamIDRemote); - } - - public static bool CloseP2PSessionWithUser(CSteamID steamIDRemote) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_CloseP2PSessionWithUser(steamIDRemote); - } - - public static bool CloseP2PChannelWithUser(CSteamID steamIDRemote, int nChannel) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_CloseP2PChannelWithUser(steamIDRemote, nChannel); - } - - public static bool GetP2PSessionState( - CSteamID steamIDRemote, - out P2PSessionState_t pConnectionState) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_GetP2PSessionState(steamIDRemote, out pConnectionState); - } - - public static bool AllowP2PPacketRelay(bool bAllow) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_AllowP2PPacketRelay(bAllow); - } - - public static SNetListenSocket_t CreateListenSocket( - int nVirtualP2PPort, - uint nIP, - ushort nPort, - bool bAllowUseOfPacketRelay) - { - InteropHelp.TestIfAvailableClient(); - return (SNetListenSocket_t) NativeMethods.ISteamNetworking_CreateListenSocket(nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay); - } - - public static SNetSocket_t CreateP2PConnectionSocket( - CSteamID steamIDTarget, - int nVirtualPort, - int nTimeoutSec, - bool bAllowUseOfPacketRelay) - { - InteropHelp.TestIfAvailableClient(); - return (SNetSocket_t) NativeMethods.ISteamNetworking_CreateP2PConnectionSocket(steamIDTarget, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay); - } - - public static SNetSocket_t CreateConnectionSocket(uint nIP, ushort nPort, int nTimeoutSec) - { - InteropHelp.TestIfAvailableClient(); - return (SNetSocket_t) NativeMethods.ISteamNetworking_CreateConnectionSocket(nIP, nPort, nTimeoutSec); - } - - public static bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_DestroySocket(hSocket, bNotifyRemoteEnd); - } - - public static bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_DestroyListenSocket(hSocket, bNotifyRemoteEnd); - } - - public static bool SendDataOnSocket( - SNetSocket_t hSocket, - byte[] pubData, - uint cubData, - bool bReliable) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_SendDataOnSocket(hSocket, pubData, cubData, bReliable); - } - - public static bool IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_IsDataAvailableOnSocket(hSocket, out pcubMsgSize); - } - - public static bool RetrieveDataFromSocket( - SNetSocket_t hSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_RetrieveDataFromSocket(hSocket, pubDest, cubDest, out pcubMsgSize); - } - - public static bool IsDataAvailable( - SNetListenSocket_t hListenSocket, - out uint pcubMsgSize, - out SNetSocket_t phSocket) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_IsDataAvailable(hListenSocket, out pcubMsgSize, out phSocket); - } - - public static bool RetrieveData( - SNetListenSocket_t hListenSocket, - byte[] pubDest, - uint cubDest, - out uint pcubMsgSize, - out SNetSocket_t phSocket) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_RetrieveData(hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket); - } - - public static bool GetSocketInfo( - SNetSocket_t hSocket, - out CSteamID pSteamIDRemote, - out int peSocketStatus, - out uint punIPRemote, - out ushort punPortRemote) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_GetSocketInfo(hSocket, out pSteamIDRemote, out peSocketStatus, out punIPRemote, out punPortRemote); - } - - public static bool GetListenSocketInfo( - SNetListenSocket_t hListenSocket, - out uint pnIP, - out ushort pnPort) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_GetListenSocketInfo(hListenSocket, out pnIP, out pnPort); - } - - public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_GetSocketConnectionType(hSocket); - } - - public static int GetMaxPacketSize(SNetSocket_t hSocket) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamNetworking_GetMaxPacketSize(hSocket); - } - } -} diff --git a/Src/SteamworksNET/SteamParamStringArray_t.cs b/Src/SteamworksNET/SteamParamStringArray_t.cs deleted file mode 100644 index 16989846..00000000 --- a/Src/SteamworksNET/SteamParamStringArray_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamParamStringArray_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamParamStringArray_t - { - public IntPtr m_ppStrings; - public int m_nNumStrings; - } -} diff --git a/Src/SteamworksNET/SteamRemoteStorage.cs b/Src/SteamworksNET/SteamRemoteStorage.cs deleted file mode 100644 index cf4e420d..00000000 --- a/Src/SteamworksNET/SteamRemoteStorage.cs +++ /dev/null @@ -1,464 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamRemoteStorage -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Collections.Generic; - -namespace Steamworks -{ - public static class SteamRemoteStorage - { - public static bool FileWrite(string pchFile, byte[] pvData, int cubData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_FileWrite(pchFile1, pvData, cubData); - } - - public static int FileRead(string pchFile, byte[] pvData, int cubDataToRead) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_FileRead(pchFile1, pvData, cubDataToRead); - } - - public static SteamAPICall_t FileWriteAsync(string pchFile, byte[] pvData, uint cubData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_FileWriteAsync(pchFile1, pvData, cubData); - } - - public static SteamAPICall_t FileReadAsync(string pchFile, uint nOffset, uint cubToRead) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_FileReadAsync(pchFile1, nOffset, cubToRead); - } - - public static bool FileReadAsyncComplete( - SteamAPICall_t hReadCall, - byte[] pvBuffer, - uint cubToRead) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_FileReadAsyncComplete(hReadCall, pvBuffer, cubToRead); - } - - public static bool FileForget(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_FileForget(pchFile1); - } - - public static bool FileDelete(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_FileDelete(pchFile1); - } - - public static SteamAPICall_t FileShare(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_FileShare(pchFile1); - } - - public static bool SetSyncPlatforms( - string pchFile, - ERemoteStoragePlatform eRemoteStoragePlatform) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_SetSyncPlatforms(pchFile1, eRemoteStoragePlatform); - } - - public static UGCFileWriteStreamHandle_t FileWriteStreamOpen(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return (UGCFileWriteStreamHandle_t) NativeMethods.ISteamRemoteStorage_FileWriteStreamOpen(pchFile1); - } - - public static bool FileWriteStreamWriteChunk( - UGCFileWriteStreamHandle_t writeHandle, - byte[] pvData, - int cubData) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_FileWriteStreamWriteChunk(writeHandle, pvData, cubData); - } - - public static bool FileWriteStreamClose(UGCFileWriteStreamHandle_t writeHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_FileWriteStreamClose(writeHandle); - } - - public static bool FileWriteStreamCancel(UGCFileWriteStreamHandle_t writeHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_FileWriteStreamCancel(writeHandle); - } - - public static bool FileExists(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_FileExists(pchFile1); - } - - public static bool FilePersisted(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_FilePersisted(pchFile1); - } - - public static int GetFileSize(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_GetFileSize(pchFile1); - } - - public static long GetFileTimestamp(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_GetFileTimestamp(pchFile1); - } - - public static ERemoteStoragePlatform GetSyncPlatforms(string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_GetSyncPlatforms(pchFile1); - } - - public static int GetFileCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_GetFileCount(); - } - - public static string GetFileNameAndSize(int iFile, out int pnFileSizeInBytes) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemoteStorage_GetFileNameAndSize(iFile, out pnFileSizeInBytes)); - } - - public static bool GetQuota(out ulong pnTotalBytes, out ulong puAvailableBytes) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_GetQuota(out pnTotalBytes, out puAvailableBytes); - } - - public static bool IsCloudEnabledForAccount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_IsCloudEnabledForAccount(); - } - - public static bool IsCloudEnabledForApp() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_IsCloudEnabledForApp(); - } - - public static void SetCloudEnabledForApp(bool bEnabled) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamRemoteStorage_SetCloudEnabledForApp(bEnabled); - } - - public static SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint unPriority) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_UGCDownload(hContent, unPriority); - } - - public static bool GetUGCDownloadProgress( - UGCHandle_t hContent, - out int pnBytesDownloaded, - out int pnBytesExpected) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_GetUGCDownloadProgress(hContent, out pnBytesDownloaded, out pnBytesExpected); - } - - public static bool GetUGCDetails( - UGCHandle_t hContent, - out AppId_t pnAppID, - out string ppchName, - out int pnFileSizeInBytes, - out CSteamID pSteamIDOwner) - { - InteropHelp.TestIfAvailableClient(); - IntPtr ppchName1; - bool ugcDetails = NativeMethods.ISteamRemoteStorage_GetUGCDetails(hContent, out pnAppID, out ppchName1, out pnFileSizeInBytes, out pSteamIDOwner); - ppchName = ugcDetails ? InteropHelp.PtrToStringUTF8(ppchName1) : (string) null; - return ugcDetails; - } - - public static int UGCRead( - UGCHandle_t hContent, - byte[] pvData, - int cubDataToRead, - uint cOffset, - EUGCReadAction eAction) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_UGCRead(hContent, pvData, cubDataToRead, cOffset, eAction); - } - - public static int GetCachedUGCCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_GetCachedUGCCount(); - } - - public static UGCHandle_t GetCachedUGCHandle(int iCachedContent) - { - InteropHelp.TestIfAvailableClient(); - return (UGCHandle_t) NativeMethods.ISteamRemoteStorage_GetCachedUGCHandle(iCachedContent); - } - - public static SteamAPICall_t PublishWorkshopFile( - string pchFile, - string pchPreviewFile, - AppId_t nConsumerAppId, - string pchTitle, - string pchDescription, - ERemoteStoragePublishedFileVisibility eVisibility, - IList pTags, - EWorkshopFileType eWorkshopFileType) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - { - using (InteropHelp.UTF8StringHandle pchPreviewFile1 = new InteropHelp.UTF8StringHandle(pchPreviewFile)) - { - using (InteropHelp.UTF8StringHandle pchTitle1 = new InteropHelp.UTF8StringHandle(pchTitle)) - { - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_PublishWorkshopFile(pchFile1, pchPreviewFile1, nConsumerAppId, pchTitle1, pchDescription1, eVisibility, (IntPtr) new InteropHelp.SteamParamStringArray(pTags), eWorkshopFileType); - } - } - } - } - - public static PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( - PublishedFileId_t unPublishedFileId) - { - InteropHelp.TestIfAvailableClient(); - return (PublishedFileUpdateHandle_t) NativeMethods.ISteamRemoteStorage_CreatePublishedFileUpdateRequest(unPublishedFileId); - } - - public static bool UpdatePublishedFileFile( - PublishedFileUpdateHandle_t updateHandle, - string pchFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFile1 = new InteropHelp.UTF8StringHandle(pchFile)) - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileFile(updateHandle, pchFile1); - } - - public static bool UpdatePublishedFilePreviewFile( - PublishedFileUpdateHandle_t updateHandle, - string pchPreviewFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchPreviewFile1 = new InteropHelp.UTF8StringHandle(pchPreviewFile)) - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFilePreviewFile(updateHandle, pchPreviewFile1); - } - - public static bool UpdatePublishedFileTitle( - PublishedFileUpdateHandle_t updateHandle, - string pchTitle) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchTitle1 = new InteropHelp.UTF8StringHandle(pchTitle)) - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileTitle(updateHandle, pchTitle1); - } - - public static bool UpdatePublishedFileDescription( - PublishedFileUpdateHandle_t updateHandle, - string pchDescription) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileDescription(updateHandle, pchDescription1); - } - - public static bool UpdatePublishedFileVisibility( - PublishedFileUpdateHandle_t updateHandle, - ERemoteStoragePublishedFileVisibility eVisibility) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileVisibility(updateHandle, eVisibility); - } - - public static bool UpdatePublishedFileTags( - PublishedFileUpdateHandle_t updateHandle, - IList pTags) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileTags(updateHandle, (IntPtr) new InteropHelp.SteamParamStringArray(pTags)); - } - - public static SteamAPICall_t CommitPublishedFileUpdate(PublishedFileUpdateHandle_t updateHandle) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_CommitPublishedFileUpdate(updateHandle); - } - - public static SteamAPICall_t GetPublishedFileDetails( - PublishedFileId_t unPublishedFileId, - uint unMaxSecondsOld) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_GetPublishedFileDetails(unPublishedFileId, unMaxSecondsOld); - } - - public static SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_DeletePublishedFile(unPublishedFileId); - } - - public static SteamAPICall_t EnumerateUserPublishedFiles(uint unStartIndex) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_EnumerateUserPublishedFiles(unStartIndex); - } - - public static SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_SubscribePublishedFile(unPublishedFileId); - } - - public static SteamAPICall_t EnumerateUserSubscribedFiles(uint unStartIndex) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_EnumerateUserSubscribedFiles(unStartIndex); - } - - public static SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_UnsubscribePublishedFile(unPublishedFileId); - } - - public static bool UpdatePublishedFileSetChangeDescription( - PublishedFileUpdateHandle_t updateHandle, - string pchChangeDescription) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchChangeDescription1 = new InteropHelp.UTF8StringHandle(pchChangeDescription)) - return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription(updateHandle, pchChangeDescription1); - } - - public static SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_GetPublishedItemVoteDetails(unPublishedFileId); - } - - public static SteamAPICall_t UpdateUserPublishedItemVote( - PublishedFileId_t unPublishedFileId, - bool bVoteUp) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_UpdateUserPublishedItemVote(unPublishedFileId, bVoteUp); - } - - public static SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_GetUserPublishedItemVoteDetails(unPublishedFileId); - } - - public static SteamAPICall_t EnumerateUserSharedWorkshopFiles( - CSteamID steamId, - uint unStartIndex, - IList pRequiredTags, - IList pExcludedTags) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles(steamId, unStartIndex, (IntPtr) new InteropHelp.SteamParamStringArray(pRequiredTags), (IntPtr) new InteropHelp.SteamParamStringArray(pExcludedTags)); - } - - public static SteamAPICall_t PublishVideo( - EWorkshopVideoProvider eVideoProvider, - string pchVideoAccount, - string pchVideoIdentifier, - string pchPreviewFile, - AppId_t nConsumerAppId, - string pchTitle, - string pchDescription, - ERemoteStoragePublishedFileVisibility eVisibility, - IList pTags) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchVideoAccount1 = new InteropHelp.UTF8StringHandle(pchVideoAccount)) - { - using (InteropHelp.UTF8StringHandle pchVideoIdentifier1 = new InteropHelp.UTF8StringHandle(pchVideoIdentifier)) - { - using (InteropHelp.UTF8StringHandle pchPreviewFile1 = new InteropHelp.UTF8StringHandle(pchPreviewFile)) - { - using (InteropHelp.UTF8StringHandle pchTitle1 = new InteropHelp.UTF8StringHandle(pchTitle)) - { - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_PublishVideo(eVideoProvider, pchVideoAccount1, pchVideoIdentifier1, pchPreviewFile1, nConsumerAppId, pchTitle1, pchDescription1, eVisibility, (IntPtr) new InteropHelp.SteamParamStringArray(pTags)); - } - } - } - } - } - - public static SteamAPICall_t SetUserPublishedFileAction( - PublishedFileId_t unPublishedFileId, - EWorkshopFileAction eAction) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_SetUserPublishedFileAction(unPublishedFileId, eAction); - } - - public static SteamAPICall_t EnumeratePublishedFilesByUserAction( - EWorkshopFileAction eAction, - uint unStartIndex) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_EnumeratePublishedFilesByUserAction(eAction, unStartIndex); - } - - public static SteamAPICall_t EnumeratePublishedWorkshopFiles( - EWorkshopEnumerationType eEnumerationType, - uint unStartIndex, - uint unCount, - uint unDays, - IList pTags, - IList pUserTags) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_EnumeratePublishedWorkshopFiles(eEnumerationType, unStartIndex, unCount, unDays, (IntPtr) new InteropHelp.SteamParamStringArray(pTags), (IntPtr) new InteropHelp.SteamParamStringArray(pUserTags)); - } - - public static SteamAPICall_t UGCDownloadToLocation( - UGCHandle_t hContent, - string pchLocation, - uint unPriority) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchLocation1 = new InteropHelp.UTF8StringHandle(pchLocation)) - return (SteamAPICall_t) NativeMethods.ISteamRemoteStorage_UGCDownloadToLocation(hContent, pchLocation1, unPriority); - } - } -} diff --git a/Src/SteamworksNET/SteamScreenshots.cs b/Src/SteamworksNET/SteamScreenshots.cs deleted file mode 100644 index b6503217..00000000 --- a/Src/SteamworksNET/SteamScreenshots.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamScreenshots -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamScreenshots - { - public static ScreenshotHandle WriteScreenshot( - byte[] pubRGB, - uint cubRGB, - int nWidth, - int nHeight) - { - InteropHelp.TestIfAvailableClient(); - return (ScreenshotHandle) NativeMethods.ISteamScreenshots_WriteScreenshot(pubRGB, cubRGB, nWidth, nHeight); - } - - public static ScreenshotHandle AddScreenshotToLibrary( - string pchFilename, - string pchThumbnailFilename, - int nWidth, - int nHeight) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFilename1 = new InteropHelp.UTF8StringHandle(pchFilename)) - { - using (InteropHelp.UTF8StringHandle pchThumbnailFilename1 = new InteropHelp.UTF8StringHandle(pchThumbnailFilename)) - return (ScreenshotHandle) NativeMethods.ISteamScreenshots_AddScreenshotToLibrary(pchFilename1, pchThumbnailFilename1, nWidth, nHeight); - } - } - - public static void TriggerScreenshot() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamScreenshots_TriggerScreenshot(); - } - - public static void HookScreenshots(bool bHook) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamScreenshots_HookScreenshots(bHook); - } - - public static bool SetLocation(ScreenshotHandle hScreenshot, string pchLocation) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchLocation1 = new InteropHelp.UTF8StringHandle(pchLocation)) - return NativeMethods.ISteamScreenshots_SetLocation(hScreenshot, pchLocation1); - } - - public static bool TagUser(ScreenshotHandle hScreenshot, CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamScreenshots_TagUser(hScreenshot, steamID); - } - - public static bool TagPublishedFile( - ScreenshotHandle hScreenshot, - PublishedFileId_t unPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamScreenshots_TagPublishedFile(hScreenshot, unPublishedFileID); - } - - public static bool IsScreenshotsHooked() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamScreenshots_IsScreenshotsHooked(); - } - - public static ScreenshotHandle AddVRScreenshotToLibrary( - EVRScreenshotType eType, - string pchFilename, - string pchVRFilename) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchFilename1 = new InteropHelp.UTF8StringHandle(pchFilename)) - { - using (InteropHelp.UTF8StringHandle pchVRFilename1 = new InteropHelp.UTF8StringHandle(pchVRFilename)) - return (ScreenshotHandle) NativeMethods.ISteamScreenshots_AddVRScreenshotToLibrary(eType, pchFilename1, pchVRFilename1); - } - } - } -} diff --git a/Src/SteamworksNET/SteamServerConnectFailure_t.cs b/Src/SteamworksNET/SteamServerConnectFailure_t.cs deleted file mode 100644 index edaa3d8f..00000000 --- a/Src/SteamworksNET/SteamServerConnectFailure_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamServerConnectFailure_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(102)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamServerConnectFailure_t - { - public const int k_iCallback = 102; - public EResult m_eResult; - [MarshalAs(UnmanagedType.I1)] - public bool m_bStillRetrying; - } -} diff --git a/Src/SteamworksNET/SteamServersConnected_t.cs b/Src/SteamworksNET/SteamServersConnected_t.cs deleted file mode 100644 index 4bb8f8a8..00000000 --- a/Src/SteamworksNET/SteamServersConnected_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamServersConnected_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(101)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct SteamServersConnected_t - { - public const int k_iCallback = 101; - } -} diff --git a/Src/SteamworksNET/SteamServersDisconnected_t.cs b/Src/SteamworksNET/SteamServersDisconnected_t.cs deleted file mode 100644 index 6172899d..00000000 --- a/Src/SteamworksNET/SteamServersDisconnected_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamServersDisconnected_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(103)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamServersDisconnected_t - { - public const int k_iCallback = 103; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/SteamShutdown_t.cs b/Src/SteamworksNET/SteamShutdown_t.cs deleted file mode 100644 index 2046fc28..00000000 --- a/Src/SteamworksNET/SteamShutdown_t.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamShutdown_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(704)] - [StructLayout(LayoutKind.Sequential, Size = 1, Pack = 8)] - public struct SteamShutdown_t - { - public const int k_iCallback = 704; - } -} diff --git a/Src/SteamworksNET/SteamUGC.cs b/Src/SteamworksNET/SteamUGC.cs deleted file mode 100644 index 94e5e73d..00000000 --- a/Src/SteamworksNET/SteamUGC.cs +++ /dev/null @@ -1,555 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUGC -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamUGC - { - public static UGCQueryHandle_t CreateQueryUserUGCRequest( - AccountID_t unAccountID, - EUserUGCList eListType, - EUGCMatchingUGCType eMatchingUGCType, - EUserUGCListSortOrder eSortOrder, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage) - { - InteropHelp.TestIfAvailableClient(); - return (UGCQueryHandle_t) NativeMethods.ISteamUGC_CreateQueryUserUGCRequest(unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage); - } - - public static UGCQueryHandle_t CreateQueryAllUGCRequest( - EUGCQuery eQueryType, - EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, - AppId_t nCreatorAppID, - AppId_t nConsumerAppID, - uint unPage) - { - InteropHelp.TestIfAvailableClient(); - return (UGCQueryHandle_t) NativeMethods.ISteamUGC_CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); - } - - public static UGCQueryHandle_t CreateQueryUGCDetailsRequest( - PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs) - { - InteropHelp.TestIfAvailableClient(); - return (UGCQueryHandle_t) NativeMethods.ISteamUGC_CreateQueryUGCDetailsRequest(pvecPublishedFileID, unNumPublishedFileIDs); - } - - public static SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_SendQueryUGCRequest(handle); - } - - public static bool GetQueryUGCResult( - UGCQueryHandle_t handle, - uint index, - out SteamUGCDetails_t pDetails) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetQueryUGCResult(handle, index, out pDetails); - } - - public static bool GetQueryUGCPreviewURL( - UGCQueryHandle_t handle, - uint index, - out string pchURL, - uint cchURLSize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) cchURLSize); - bool queryUgcPreviewUrl = NativeMethods.ISteamUGC_GetQueryUGCPreviewURL(handle, index, num, cchURLSize); - pchURL = queryUgcPreviewUrl ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return queryUgcPreviewUrl; - } - - public static bool GetQueryUGCMetadata( - UGCQueryHandle_t handle, - uint index, - out string pchMetadata, - uint cchMetadatasize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) cchMetadatasize); - bool queryUgcMetadata = NativeMethods.ISteamUGC_GetQueryUGCMetadata(handle, index, num, cchMetadatasize); - pchMetadata = queryUgcMetadata ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return queryUgcMetadata; - } - - public static bool GetQueryUGCChildren( - UGCQueryHandle_t handle, - uint index, - PublishedFileId_t[] pvecPublishedFileID, - uint cMaxEntries) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetQueryUGCChildren(handle, index, pvecPublishedFileID, cMaxEntries); - } - - public static bool GetQueryUGCStatistic( - UGCQueryHandle_t handle, - uint index, - EItemStatistic eStatType, - out ulong pStatValue) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetQueryUGCStatistic(handle, index, eStatType, out pStatValue); - } - - public static uint GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint index) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetQueryUGCNumAdditionalPreviews(handle, index); - } - - public static bool GetQueryUGCAdditionalPreview( - UGCQueryHandle_t handle, - uint index, - uint previewIndex, - out string pchURLOrVideoID, - uint cchURLSize, - out string pchOriginalFileName, - uint cchOriginalFileNameSize, - out EItemPreviewType pPreviewType) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num1 = Marshal.AllocHGlobal((int) cchURLSize); - IntPtr num2 = Marshal.AllocHGlobal((int) cchOriginalFileNameSize); - bool additionalPreview = NativeMethods.ISteamUGC_GetQueryUGCAdditionalPreview(handle, index, previewIndex, num1, cchURLSize, num2, cchOriginalFileNameSize, out pPreviewType); - pchURLOrVideoID = additionalPreview ? InteropHelp.PtrToStringUTF8(num1) : (string) null; - Marshal.FreeHGlobal(num1); - pchOriginalFileName = additionalPreview ? InteropHelp.PtrToStringUTF8(num2) : (string) null; - Marshal.FreeHGlobal(num2); - return additionalPreview; - } - - public static uint GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint index) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetQueryUGCNumKeyValueTags(handle, index); - } - - public static bool GetQueryUGCKeyValueTag( - UGCQueryHandle_t handle, - uint index, - uint keyValueTagIndex, - out string pchKey, - uint cchKeySize, - out string pchValue, - uint cchValueSize) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num1 = Marshal.AllocHGlobal((int) cchKeySize); - IntPtr num2 = Marshal.AllocHGlobal((int) cchValueSize); - bool queryUgcKeyValueTag = NativeMethods.ISteamUGC_GetQueryUGCKeyValueTag(handle, index, keyValueTagIndex, num1, cchKeySize, num2, cchValueSize); - pchKey = queryUgcKeyValueTag ? InteropHelp.PtrToStringUTF8(num1) : (string) null; - Marshal.FreeHGlobal(num1); - pchValue = queryUgcKeyValueTag ? InteropHelp.PtrToStringUTF8(num2) : (string) null; - Marshal.FreeHGlobal(num2); - return queryUgcKeyValueTag; - } - - public static bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_ReleaseQueryUGCRequest(handle); - } - - public static bool AddRequiredTag(UGCQueryHandle_t handle, string pTagName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pTagName1 = new InteropHelp.UTF8StringHandle(pTagName)) - return NativeMethods.ISteamUGC_AddRequiredTag(handle, pTagName1); - } - - public static bool AddExcludedTag(UGCQueryHandle_t handle, string pTagName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pTagName1 = new InteropHelp.UTF8StringHandle(pTagName)) - return NativeMethods.ISteamUGC_AddExcludedTag(handle, pTagName1); - } - - public static bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnOnlyIDs(handle, bReturnOnlyIDs); - } - - public static bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnKeyValueTags(handle, bReturnKeyValueTags); - } - - public static bool SetReturnLongDescription( - UGCQueryHandle_t handle, - bool bReturnLongDescription) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnLongDescription(handle, bReturnLongDescription); - } - - public static bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnMetadata(handle, bReturnMetadata); - } - - public static bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnChildren(handle, bReturnChildren); - } - - public static bool SetReturnAdditionalPreviews( - UGCQueryHandle_t handle, - bool bReturnAdditionalPreviews) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnAdditionalPreviews(handle, bReturnAdditionalPreviews); - } - - public static bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetReturnTotalOnly(handle, bReturnTotalOnly); - } - - public static bool SetLanguage(UGCQueryHandle_t handle, string pchLanguage) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchLanguage1 = new InteropHelp.UTF8StringHandle(pchLanguage)) - return NativeMethods.ISteamUGC_SetLanguage(handle, pchLanguage1); - } - - public static bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint unMaxAgeSeconds) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetAllowCachedResponse(handle, unMaxAgeSeconds); - } - - public static bool SetCloudFileNameFilter(UGCQueryHandle_t handle, string pMatchCloudFileName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pMatchCloudFileName1 = new InteropHelp.UTF8StringHandle(pMatchCloudFileName)) - return NativeMethods.ISteamUGC_SetCloudFileNameFilter(handle, pMatchCloudFileName1); - } - - public static bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetMatchAnyTag(handle, bMatchAnyTag); - } - - public static bool SetSearchText(UGCQueryHandle_t handle, string pSearchText) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pSearchText1 = new InteropHelp.UTF8StringHandle(pSearchText)) - return NativeMethods.ISteamUGC_SetSearchText(handle, pSearchText1); - } - - public static bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint unDays) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetRankedByTrendDays(handle, unDays); - } - - public static bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, string pKey, string pValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pKey1 = new InteropHelp.UTF8StringHandle(pKey)) - { - using (InteropHelp.UTF8StringHandle pValue1 = new InteropHelp.UTF8StringHandle(pValue)) - return NativeMethods.ISteamUGC_AddRequiredKeyValueTag(handle, pKey1, pValue1); - } - } - - public static SteamAPICall_t RequestUGCDetails( - PublishedFileId_t nPublishedFileID, - uint unMaxAgeSeconds) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_RequestUGCDetails(nPublishedFileID, unMaxAgeSeconds); - } - - public static SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_CreateItem(nConsumerAppId, eFileType); - } - - public static UGCUpdateHandle_t StartItemUpdate( - AppId_t nConsumerAppId, - PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return (UGCUpdateHandle_t) NativeMethods.ISteamUGC_StartItemUpdate(nConsumerAppId, nPublishedFileID); - } - - public static bool SetItemTitle(UGCUpdateHandle_t handle, string pchTitle) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchTitle1 = new InteropHelp.UTF8StringHandle(pchTitle)) - return NativeMethods.ISteamUGC_SetItemTitle(handle, pchTitle1); - } - - public static bool SetItemDescription(UGCUpdateHandle_t handle, string pchDescription) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - return NativeMethods.ISteamUGC_SetItemDescription(handle, pchDescription1); - } - - public static bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, string pchLanguage) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchLanguage1 = new InteropHelp.UTF8StringHandle(pchLanguage)) - return NativeMethods.ISteamUGC_SetItemUpdateLanguage(handle, pchLanguage1); - } - - public static bool SetItemMetadata(UGCUpdateHandle_t handle, string pchMetaData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchMetaData1 = new InteropHelp.UTF8StringHandle(pchMetaData)) - return NativeMethods.ISteamUGC_SetItemMetadata(handle, pchMetaData1); - } - - public static bool SetItemVisibility( - UGCUpdateHandle_t handle, - ERemoteStoragePublishedFileVisibility eVisibility) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetItemVisibility(handle, eVisibility); - } - - public static bool SetItemTags(UGCUpdateHandle_t updateHandle, IList pTags) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_SetItemTags(updateHandle, (IntPtr) new InteropHelp.SteamParamStringArray(pTags)); - } - - public static bool SetItemContent(UGCUpdateHandle_t handle, string pszContentFolder) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszContentFolder1 = new InteropHelp.UTF8StringHandle(pszContentFolder)) - return NativeMethods.ISteamUGC_SetItemContent(handle, pszContentFolder1); - } - - public static bool SetItemPreview(UGCUpdateHandle_t handle, string pszPreviewFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszPreviewFile1 = new InteropHelp.UTF8StringHandle(pszPreviewFile)) - return NativeMethods.ISteamUGC_SetItemPreview(handle, pszPreviewFile1); - } - - public static bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return NativeMethods.ISteamUGC_RemoveItemKeyValueTags(handle, pchKey1); - } - - public static bool AddItemKeyValueTag(UGCUpdateHandle_t handle, string pchKey, string pchValue) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - { - using (InteropHelp.UTF8StringHandle pchValue1 = new InteropHelp.UTF8StringHandle(pchValue)) - return NativeMethods.ISteamUGC_AddItemKeyValueTag(handle, pchKey1, pchValue1); - } - } - - public static bool AddItemPreviewFile( - UGCUpdateHandle_t handle, - string pszPreviewFile, - EItemPreviewType type) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszPreviewFile1 = new InteropHelp.UTF8StringHandle(pszPreviewFile)) - return NativeMethods.ISteamUGC_AddItemPreviewFile(handle, pszPreviewFile1, type); - } - - public static bool AddItemPreviewVideo(UGCUpdateHandle_t handle, string pszVideoID) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszVideoID1 = new InteropHelp.UTF8StringHandle(pszVideoID)) - return NativeMethods.ISteamUGC_AddItemPreviewVideo(handle, pszVideoID1); - } - - public static bool UpdateItemPreviewFile( - UGCUpdateHandle_t handle, - uint index, - string pszPreviewFile) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszPreviewFile1 = new InteropHelp.UTF8StringHandle(pszPreviewFile)) - return NativeMethods.ISteamUGC_UpdateItemPreviewFile(handle, index, pszPreviewFile1); - } - - public static bool UpdateItemPreviewVideo( - UGCUpdateHandle_t handle, - uint index, - string pszVideoID) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszVideoID1 = new InteropHelp.UTF8StringHandle(pszVideoID)) - return NativeMethods.ISteamUGC_UpdateItemPreviewVideo(handle, index, pszVideoID1); - } - - public static bool RemoveItemPreview(UGCUpdateHandle_t handle, uint index) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_RemoveItemPreview(handle, index); - } - - public static SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, string pchChangeNote) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchChangeNote1 = new InteropHelp.UTF8StringHandle(pchChangeNote)) - return (SteamAPICall_t) NativeMethods.ISteamUGC_SubmitItemUpdate(handle, pchChangeNote1); - } - - public static EItemUpdateStatus GetItemUpdateProgress( - UGCUpdateHandle_t handle, - out ulong punBytesProcessed, - out ulong punBytesTotal) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetItemUpdateProgress(handle, out punBytesProcessed, out punBytesTotal); - } - - public static SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_SetUserItemVote(nPublishedFileID, bVoteUp); - } - - public static SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_GetUserItemVote(nPublishedFileID); - } - - public static SteamAPICall_t AddItemToFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_AddItemToFavorites(nAppId, nPublishedFileID); - } - - public static SteamAPICall_t RemoveItemFromFavorites( - AppId_t nAppId, - PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_RemoveItemFromFavorites(nAppId, nPublishedFileID); - } - - public static SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_SubscribeItem(nPublishedFileID); - } - - public static SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_UnsubscribeItem(nPublishedFileID); - } - - public static uint GetNumSubscribedItems() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetNumSubscribedItems(); - } - - public static uint GetSubscribedItems(PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetSubscribedItems(pvecPublishedFileID, cMaxEntries); - } - - public static uint GetItemState(PublishedFileId_t nPublishedFileID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetItemState(nPublishedFileID); - } - - public static bool GetItemInstallInfo( - PublishedFileId_t nPublishedFileID, - out ulong punSizeOnDisk, - out string pchFolder, - uint cchFolderSize, - out uint punTimeStamp) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) cchFolderSize); - bool itemInstallInfo = NativeMethods.ISteamUGC_GetItemInstallInfo(nPublishedFileID, out punSizeOnDisk, num, cchFolderSize, out punTimeStamp); - pchFolder = itemInstallInfo ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return itemInstallInfo; - } - - public static bool GetItemDownloadInfo( - PublishedFileId_t nPublishedFileID, - out ulong punBytesDownloaded, - out ulong punBytesTotal) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_GetItemDownloadInfo(nPublishedFileID, out punBytesDownloaded, out punBytesTotal); - } - - public static bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUGC_DownloadItem(nPublishedFileID, bHighPriority); - } - - public static bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, string pszFolder) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pszFolder1 = new InteropHelp.UTF8StringHandle(pszFolder)) - return NativeMethods.ISteamUGC_BInitWorkshopForGameServer(unWorkshopDepotID, pszFolder1); - } - - public static void SuspendDownloads(bool bSuspend) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUGC_SuspendDownloads(bSuspend); - } - - public static SteamAPICall_t StartPlaytimeTracking( - PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_StartPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs); - } - - public static SteamAPICall_t StopPlaytimeTracking( - PublishedFileId_t[] pvecPublishedFileID, - uint unNumPublishedFileIDs) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_StopPlaytimeTracking(pvecPublishedFileID, unNumPublishedFileIDs); - } - - public static SteamAPICall_t StopPlaytimeTrackingForAllItems() - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUGC_StopPlaytimeTrackingForAllItems(); - } - } -} diff --git a/Src/SteamworksNET/SteamUGCDetails_t.cs b/Src/SteamworksNET/SteamUGCDetails_t.cs deleted file mode 100644 index b2e5e9b7..00000000 --- a/Src/SteamworksNET/SteamUGCDetails_t.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUGCDetails_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamUGCDetails_t - { - public PublishedFileId_t m_nPublishedFileId; - public EResult m_eResult; - public EWorkshopFileType m_eFileType; - public AppId_t m_nCreatorAppID; - public AppId_t m_nConsumerAppID; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)] - public string m_rgchTitle; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8000)] - public string m_rgchDescription; - public ulong m_ulSteamIDOwner; - public uint m_rtimeCreated; - public uint m_rtimeUpdated; - public uint m_rtimeAddedToUserList; - public ERemoteStoragePublishedFileVisibility m_eVisibility; - [MarshalAs(UnmanagedType.I1)] - public bool m_bBanned; - [MarshalAs(UnmanagedType.I1)] - public bool m_bAcceptedForUse; - [MarshalAs(UnmanagedType.I1)] - public bool m_bTagsTruncated; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1025)] - public string m_rgchTags; - public UGCHandle_t m_hFile; - public UGCHandle_t m_hPreviewFile; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string m_pchFileName; - public int m_nFileSize; - public int m_nPreviewFileSize; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_rgchURL; - public uint m_unVotesUp; - public uint m_unVotesDown; - public float m_flScore; - public uint m_unNumChildren; - } -} diff --git a/Src/SteamworksNET/SteamUGCQueryCompleted_t.cs b/Src/SteamworksNET/SteamUGCQueryCompleted_t.cs deleted file mode 100644 index 646211c2..00000000 --- a/Src/SteamworksNET/SteamUGCQueryCompleted_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUGCQueryCompleted_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3401)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamUGCQueryCompleted_t - { - public const int k_iCallback = 3401; - public UGCQueryHandle_t m_handle; - public EResult m_eResult; - public uint m_unNumResultsReturned; - public uint m_unTotalMatchingResults; - [MarshalAs(UnmanagedType.I1)] - public bool m_bCachedData; - } -} diff --git a/Src/SteamworksNET/SteamUGCRequestUGCDetailsResult_t.cs b/Src/SteamworksNET/SteamUGCRequestUGCDetailsResult_t.cs deleted file mode 100644 index 7d35eb03..00000000 --- a/Src/SteamworksNET/SteamUGCRequestUGCDetailsResult_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUGCRequestUGCDetailsResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3402)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamUGCRequestUGCDetailsResult_t - { - public const int k_iCallback = 3402; - public SteamUGCDetails_t m_details; - [MarshalAs(UnmanagedType.I1)] - public bool m_bCachedData; - } -} diff --git a/Src/SteamworksNET/SteamUnifiedMessages.cs b/Src/SteamworksNET/SteamUnifiedMessages.cs deleted file mode 100644 index 5b1a6513..00000000 --- a/Src/SteamworksNET/SteamUnifiedMessages.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUnifiedMessages -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamUnifiedMessages - { - public static ClientUnifiedMessageHandle SendMethod( - string pchServiceMethod, - byte[] pRequestBuffer, - uint unRequestBufferSize, - ulong unContext) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchServiceMethod1 = new InteropHelp.UTF8StringHandle(pchServiceMethod)) - return (ClientUnifiedMessageHandle) NativeMethods.ISteamUnifiedMessages_SendMethod(pchServiceMethod1, pRequestBuffer, unRequestBufferSize, unContext); - } - - public static bool GetMethodResponseInfo( - ClientUnifiedMessageHandle hHandle, - out uint punResponseSize, - out EResult peResult) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUnifiedMessages_GetMethodResponseInfo(hHandle, out punResponseSize, out peResult); - } - - public static bool GetMethodResponseData( - ClientUnifiedMessageHandle hHandle, - byte[] pResponseBuffer, - uint unResponseBufferSize, - bool bAutoRelease) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUnifiedMessages_GetMethodResponseData(hHandle, pResponseBuffer, unResponseBufferSize, bAutoRelease); - } - - public static bool ReleaseMethod(ClientUnifiedMessageHandle hHandle) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUnifiedMessages_ReleaseMethod(hHandle); - } - - public static bool SendNotification( - string pchServiceNotification, - byte[] pNotificationBuffer, - uint unNotificationBufferSize) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchServiceNotification1 = new InteropHelp.UTF8StringHandle(pchServiceNotification)) - return NativeMethods.ISteamUnifiedMessages_SendNotification(pchServiceNotification1, pNotificationBuffer, unNotificationBufferSize); - } - } -} diff --git a/Src/SteamworksNET/SteamUnifiedMessagesSendMethodResult_t.cs b/Src/SteamworksNET/SteamUnifiedMessagesSendMethodResult_t.cs deleted file mode 100644 index 731459cd..00000000 --- a/Src/SteamworksNET/SteamUnifiedMessagesSendMethodResult_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUnifiedMessagesSendMethodResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(2501)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SteamUnifiedMessagesSendMethodResult_t - { - public const int k_iCallback = 2501; - public ClientUnifiedMessageHandle m_hHandle; - public ulong m_unContext; - public EResult m_eResult; - public uint m_unResponseSize; - } -} diff --git a/Src/SteamworksNET/SteamUser.cs b/Src/SteamworksNET/SteamUser.cs deleted file mode 100644 index 34fa60de..00000000 --- a/Src/SteamworksNET/SteamUser.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUser -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamUser - { - public static HSteamUser GetHSteamUser() - { - InteropHelp.TestIfAvailableClient(); - return (HSteamUser) NativeMethods.ISteamUser_GetHSteamUser(); - } - - public static bool BLoggedOn() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BLoggedOn(); - } - - public static CSteamID GetSteamID() - { - InteropHelp.TestIfAvailableClient(); - return (CSteamID) NativeMethods.ISteamUser_GetSteamID(); - } - - public static int InitiateGameConnection( - byte[] pAuthBlob, - int cbMaxAuthBlob, - CSteamID steamIDGameServer, - uint unIPServer, - ushort usPortServer, - bool bSecure) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_InitiateGameConnection(pAuthBlob, cbMaxAuthBlob, steamIDGameServer, unIPServer, usPortServer, bSecure); - } - - public static void TerminateGameConnection(uint unIPServer, ushort usPortServer) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUser_TerminateGameConnection(unIPServer, usPortServer); - } - - public static void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, string pchExtraInfo = "") - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchExtraInfo1 = new InteropHelp.UTF8StringHandle(pchExtraInfo)) - NativeMethods.ISteamUser_TrackAppUsageEvent(gameID, eAppUsageEvent, pchExtraInfo1); - } - - public static bool GetUserDataFolder(out string pchBuffer, int cubBuffer) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal(cubBuffer); - bool userDataFolder = NativeMethods.ISteamUser_GetUserDataFolder(num, cubBuffer); - pchBuffer = userDataFolder ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return userDataFolder; - } - - public static void StartVoiceRecording() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUser_StartVoiceRecording(); - } - - public static void StopVoiceRecording() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUser_StopVoiceRecording(); - } - - public static EVoiceResult GetAvailableVoice( - out uint pcbCompressed, - out uint pcbUncompressed, - uint nUncompressedVoiceDesiredSampleRate) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_GetAvailableVoice(out pcbCompressed, out pcbUncompressed, nUncompressedVoiceDesiredSampleRate); - } - - public static EVoiceResult GetVoice( - bool bWantCompressed, - byte[] pDestBuffer, - uint cbDestBufferSize, - out uint nBytesWritten, - bool bWantUncompressed, - byte[] pUncompressedDestBuffer, - uint cbUncompressedDestBufferSize, - out uint nUncompressBytesWritten, - uint nUncompressedVoiceDesiredSampleRate) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_GetVoice(bWantCompressed, pDestBuffer, cbDestBufferSize, out nBytesWritten, bWantUncompressed, pUncompressedDestBuffer, cbUncompressedDestBufferSize, out nUncompressBytesWritten, nUncompressedVoiceDesiredSampleRate); - } - - public static EVoiceResult DecompressVoice( - byte[] pCompressed, - uint cbCompressed, - byte[] pDestBuffer, - uint cbDestBufferSize, - out uint nBytesWritten, - uint nDesiredSampleRate) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_DecompressVoice(pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, out nBytesWritten, nDesiredSampleRate); - } - - public static uint GetVoiceOptimalSampleRate() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_GetVoiceOptimalSampleRate(); - } - - public static HAuthTicket GetAuthSessionTicket( - byte[] pTicket, - int cbMaxTicket, - out uint pcbTicket) - { - InteropHelp.TestIfAvailableClient(); - return (HAuthTicket) NativeMethods.ISteamUser_GetAuthSessionTicket(pTicket, cbMaxTicket, out pcbTicket); - } - - public static EBeginAuthSessionResult BeginAuthSession( - byte[] pAuthTicket, - int cbAuthTicket, - CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BeginAuthSession(pAuthTicket, cbAuthTicket, steamID); - } - - public static void EndAuthSession(CSteamID steamID) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUser_EndAuthSession(steamID); - } - - public static void CancelAuthTicket(HAuthTicket hAuthTicket) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUser_CancelAuthTicket(hAuthTicket); - } - - public static EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_UserHasLicenseForApp(steamID, appID); - } - - public static bool BIsBehindNAT() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BIsBehindNAT(); - } - - public static void AdvertiseGame( - CSteamID steamIDGameServer, - uint unIPServer, - ushort usPortServer) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUser_AdvertiseGame(steamIDGameServer, unIPServer, usPortServer); - } - - public static SteamAPICall_t RequestEncryptedAppTicket( - byte[] pDataToInclude, - int cbDataToInclude) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUser_RequestEncryptedAppTicket(pDataToInclude, cbDataToInclude); - } - - public static bool GetEncryptedAppTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_GetEncryptedAppTicket(pTicket, cbMaxTicket, out pcbTicket); - } - - public static int GetGameBadgeLevel(int nSeries, bool bFoil) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_GetGameBadgeLevel(nSeries, bFoil); - } - - public static int GetPlayerSteamLevel() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_GetPlayerSteamLevel(); - } - - public static SteamAPICall_t RequestStoreAuthURL(string pchRedirectURL) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchRedirectURL1 = new InteropHelp.UTF8StringHandle(pchRedirectURL)) - return (SteamAPICall_t) NativeMethods.ISteamUser_RequestStoreAuthURL(pchRedirectURL1); - } - - public static bool BIsPhoneVerified() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BIsPhoneVerified(); - } - - public static bool BIsTwoFactorEnabled() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BIsTwoFactorEnabled(); - } - - public static bool BIsPhoneIdentifying() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BIsPhoneIdentifying(); - } - - public static bool BIsPhoneRequiringVerification() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUser_BIsPhoneRequiringVerification(); - } - } -} diff --git a/Src/SteamworksNET/SteamUserStats.cs b/Src/SteamworksNET/SteamUserStats.cs deleted file mode 100644 index c07974b9..00000000 --- a/Src/SteamworksNET/SteamUserStats.cs +++ /dev/null @@ -1,355 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUserStats -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamUserStats - { - public static bool RequestCurrentStats() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_RequestCurrentStats(); - } - - public static bool GetStat(string pchName, out int pData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetStat(pchName1, out pData); - } - - public static bool GetStat(string pchName, out float pData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetStat_(pchName1, out pData); - } - - public static bool SetStat(string pchName, int nData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_SetStat(pchName1, nData); - } - - public static bool SetStat(string pchName, float fData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_SetStat_(pchName1, fData); - } - - public static bool UpdateAvgRateStat( - string pchName, - float flCountThisSession, - double dSessionLength) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_UpdateAvgRateStat(pchName1, flCountThisSession, dSessionLength); - } - - public static bool GetAchievement(string pchName, out bool pbAchieved) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetAchievement(pchName1, out pbAchieved); - } - - public static bool SetAchievement(string pchName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_SetAchievement(pchName1); - } - - public static bool ClearAchievement(string pchName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_ClearAchievement(pchName1); - } - - public static bool GetAchievementAndUnlockTime( - string pchName, - out bool pbAchieved, - out uint punUnlockTime) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetAchievementAndUnlockTime(pchName1, out pbAchieved, out punUnlockTime); - } - - public static bool StoreStats() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_StoreStats(); - } - - public static int GetAchievementIcon(string pchName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetAchievementIcon(pchName1); - } - - public static string GetAchievementDisplayAttribute(string pchName, string pchKey) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - { - using (InteropHelp.UTF8StringHandle pchKey1 = new InteropHelp.UTF8StringHandle(pchKey)) - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetAchievementDisplayAttribute(pchName1, pchKey1)); - } - } - - public static bool IndicateAchievementProgress( - string pchName, - uint nCurProgress, - uint nMaxProgress) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_IndicateAchievementProgress(pchName1, nCurProgress, nMaxProgress); - } - - public static uint GetNumAchievements() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_GetNumAchievements(); - } - - public static string GetAchievementName(uint iAchievement) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetAchievementName(iAchievement)); - } - - public static SteamAPICall_t RequestUserStats(CSteamID steamIDUser) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_RequestUserStats(steamIDUser); - } - - public static bool GetUserStat(CSteamID steamIDUser, string pchName, out int pData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetUserStat(steamIDUser, pchName1, out pData); - } - - public static bool GetUserStat(CSteamID steamIDUser, string pchName, out float pData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetUserStat_(steamIDUser, pchName1, out pData); - } - - public static bool GetUserAchievement( - CSteamID steamIDUser, - string pchName, - out bool pbAchieved) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetUserAchievement(steamIDUser, pchName1, out pbAchieved); - } - - public static bool GetUserAchievementAndUnlockTime( - CSteamID steamIDUser, - string pchName, - out bool pbAchieved, - out uint punUnlockTime) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetUserAchievementAndUnlockTime(steamIDUser, pchName1, out pbAchieved, out punUnlockTime); - } - - public static bool ResetAllStats(bool bAchievementsToo) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_ResetAllStats(bAchievementsToo); - } - - public static SteamAPICall_t FindOrCreateLeaderboard( - string pchLeaderboardName, - ELeaderboardSortMethod eLeaderboardSortMethod, - ELeaderboardDisplayType eLeaderboardDisplayType) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchLeaderboardName1 = new InteropHelp.UTF8StringHandle(pchLeaderboardName)) - return (SteamAPICall_t) NativeMethods.ISteamUserStats_FindOrCreateLeaderboard(pchLeaderboardName1, eLeaderboardSortMethod, eLeaderboardDisplayType); - } - - public static SteamAPICall_t FindLeaderboard(string pchLeaderboardName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchLeaderboardName1 = new InteropHelp.UTF8StringHandle(pchLeaderboardName)) - return (SteamAPICall_t) NativeMethods.ISteamUserStats_FindLeaderboard(pchLeaderboardName1); - } - - public static string GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetLeaderboardName(hSteamLeaderboard)); - } - - public static int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_GetLeaderboardEntryCount(hSteamLeaderboard); - } - - public static ELeaderboardSortMethod GetLeaderboardSortMethod( - SteamLeaderboard_t hSteamLeaderboard) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_GetLeaderboardSortMethod(hSteamLeaderboard); - } - - public static ELeaderboardDisplayType GetLeaderboardDisplayType( - SteamLeaderboard_t hSteamLeaderboard) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_GetLeaderboardDisplayType(hSteamLeaderboard); - } - - public static SteamAPICall_t DownloadLeaderboardEntries( - SteamLeaderboard_t hSteamLeaderboard, - ELeaderboardDataRequest eLeaderboardDataRequest, - int nRangeStart, - int nRangeEnd) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_DownloadLeaderboardEntries(hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd); - } - - public static SteamAPICall_t DownloadLeaderboardEntriesForUsers( - SteamLeaderboard_t hSteamLeaderboard, - CSteamID[] prgUsers, - int cUsers) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_DownloadLeaderboardEntriesForUsers(hSteamLeaderboard, prgUsers, cUsers); - } - - public static bool GetDownloadedLeaderboardEntry( - SteamLeaderboardEntries_t hSteamLeaderboardEntries, - int index, - out LeaderboardEntry_t pLeaderboardEntry, - int[] pDetails, - int cDetailsMax) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUserStats_GetDownloadedLeaderboardEntry(hSteamLeaderboardEntries, index, out pLeaderboardEntry, pDetails, cDetailsMax); - } - - public static SteamAPICall_t UploadLeaderboardScore( - SteamLeaderboard_t hSteamLeaderboard, - ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, - int nScore, - int[] pScoreDetails, - int cScoreDetailsCount) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_UploadLeaderboardScore(hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount); - } - - public static SteamAPICall_t AttachLeaderboardUGC( - SteamLeaderboard_t hSteamLeaderboard, - UGCHandle_t hUGC) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_AttachLeaderboardUGC(hSteamLeaderboard, hUGC); - } - - public static SteamAPICall_t GetNumberOfCurrentPlayers() - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_GetNumberOfCurrentPlayers(); - } - - public static SteamAPICall_t RequestGlobalAchievementPercentages() - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_RequestGlobalAchievementPercentages(); - } - - public static int GetMostAchievedAchievementInfo( - out string pchName, - uint unNameBufLen, - out float pflPercent, - out bool pbAchieved) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) unNameBufLen); - int achievedAchievementInfo = NativeMethods.ISteamUserStats_GetMostAchievedAchievementInfo(num, unNameBufLen, out pflPercent, out pbAchieved); - pchName = achievedAchievementInfo != -1 ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return achievedAchievementInfo; - } - - public static int GetNextMostAchievedAchievementInfo( - int iIteratorPrevious, - out string pchName, - uint unNameBufLen, - out float pflPercent, - out bool pbAchieved) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) unNameBufLen); - int achievedAchievementInfo = NativeMethods.ISteamUserStats_GetNextMostAchievedAchievementInfo(iIteratorPrevious, num, unNameBufLen, out pflPercent, out pbAchieved); - pchName = achievedAchievementInfo != -1 ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return achievedAchievementInfo; - } - - public static bool GetAchievementAchievedPercent(string pchName, out float pflPercent) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchName1 = new InteropHelp.UTF8StringHandle(pchName)) - return NativeMethods.ISteamUserStats_GetAchievementAchievedPercent(pchName1, out pflPercent); - } - - public static SteamAPICall_t RequestGlobalStats(int nHistoryDays) - { - InteropHelp.TestIfAvailableClient(); - return (SteamAPICall_t) NativeMethods.ISteamUserStats_RequestGlobalStats(nHistoryDays); - } - - public static bool GetGlobalStat(string pchStatName, out long pData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchStatName1 = new InteropHelp.UTF8StringHandle(pchStatName)) - return NativeMethods.ISteamUserStats_GetGlobalStat(pchStatName1, out pData); - } - - public static bool GetGlobalStat(string pchStatName, out double pData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchStatName1 = new InteropHelp.UTF8StringHandle(pchStatName)) - return NativeMethods.ISteamUserStats_GetGlobalStat_(pchStatName1, out pData); - } - - public static int GetGlobalStatHistory(string pchStatName, long[] pData, uint cubData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchStatName1 = new InteropHelp.UTF8StringHandle(pchStatName)) - return NativeMethods.ISteamUserStats_GetGlobalStatHistory(pchStatName1, pData, cubData); - } - - public static int GetGlobalStatHistory(string pchStatName, double[] pData, uint cubData) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchStatName1 = new InteropHelp.UTF8StringHandle(pchStatName)) - return NativeMethods.ISteamUserStats_GetGlobalStatHistory_(pchStatName1, pData, cubData); - } - } -} diff --git a/Src/SteamworksNET/SteamUtils.cs b/Src/SteamworksNET/SteamUtils.cs deleted file mode 100644 index 1c935dfa..00000000 --- a/Src/SteamworksNET/SteamUtils.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamUtils -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; - -namespace Steamworks -{ - public static class SteamUtils - { - public static uint GetSecondsSinceAppActive() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetSecondsSinceAppActive(); - } - - public static uint GetSecondsSinceComputerActive() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetSecondsSinceComputerActive(); - } - - public static EUniverse GetConnectedUniverse() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetConnectedUniverse(); - } - - public static uint GetServerRealTime() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetServerRealTime(); - } - - public static string GetIPCountry() - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetIPCountry()); - } - - public static bool GetImageSize(int iImage, out uint pnWidth, out uint pnHeight) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetImageSize(iImage, out pnWidth, out pnHeight); - } - - public static bool GetImageRGBA(int iImage, byte[] pubDest, int nDestBufferSize) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetImageRGBA(iImage, pubDest, nDestBufferSize); - } - - public static bool GetCSERIPPort(out uint unIP, out ushort usPort) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetCSERIPPort(out unIP, out usPort); - } - - public static byte GetCurrentBatteryPower() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetCurrentBatteryPower(); - } - - public static AppId_t GetAppID() - { - InteropHelp.TestIfAvailableClient(); - return (AppId_t) NativeMethods.ISteamUtils_GetAppID(); - } - - public static void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUtils_SetOverlayNotificationPosition(eNotificationPosition); - } - - public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_IsAPICallCompleted(hSteamAPICall, out pbFailed); - } - - public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetAPICallFailureReason(hSteamAPICall); - } - - public static bool GetAPICallResult( - SteamAPICall_t hSteamAPICall, - IntPtr pCallback, - int cubCallback, - int iCallbackExpected, - out bool pbFailed) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed); - } - - public static uint GetIPCCallCount() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetIPCCallCount(); - } - - public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUtils_SetWarningMessageHook(pFunction); - } - - public static bool IsOverlayEnabled() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_IsOverlayEnabled(); - } - - public static bool BOverlayNeedsPresent() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_BOverlayNeedsPresent(); - } - - public static SteamAPICall_t CheckFileSignature(string szFileName) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle szFileName1 = new InteropHelp.UTF8StringHandle(szFileName)) - return (SteamAPICall_t) NativeMethods.ISteamUtils_CheckFileSignature(szFileName1); - } - - public static bool ShowGamepadTextInput( - EGamepadTextInputMode eInputMode, - EGamepadTextInputLineMode eLineInputMode, - string pchDescription, - uint unCharMax, - string pchExistingText) - { - InteropHelp.TestIfAvailableClient(); - using (InteropHelp.UTF8StringHandle pchDescription1 = new InteropHelp.UTF8StringHandle(pchDescription)) - { - using (InteropHelp.UTF8StringHandle pchExistingText1 = new InteropHelp.UTF8StringHandle(pchExistingText)) - return NativeMethods.ISteamUtils_ShowGamepadTextInput(eInputMode, eLineInputMode, pchDescription1, unCharMax, pchExistingText1); - } - } - - public static uint GetEnteredGamepadTextLength() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_GetEnteredGamepadTextLength(); - } - - public static bool GetEnteredGamepadTextInput(out string pchText, uint cchText) - { - InteropHelp.TestIfAvailableClient(); - IntPtr num = Marshal.AllocHGlobal((int) cchText); - bool gamepadTextInput = NativeMethods.ISteamUtils_GetEnteredGamepadTextInput(num, cchText); - pchText = gamepadTextInput ? InteropHelp.PtrToStringUTF8(num) : (string) null; - Marshal.FreeHGlobal(num); - return gamepadTextInput; - } - - public static string GetSteamUILanguage() - { - InteropHelp.TestIfAvailableClient(); - return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetSteamUILanguage()); - } - - public static bool IsSteamRunningInVR() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_IsSteamRunningInVR(); - } - - public static void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUtils_SetOverlayNotificationInset(nHorizontalInset, nVerticalInset); - } - - public static bool IsSteamInBigPictureMode() - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamUtils_IsSteamInBigPictureMode(); - } - - public static void StartVRDashboard() - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamUtils_StartVRDashboard(); - } - } -} diff --git a/Src/SteamworksNET/SteamVideo.cs b/Src/SteamworksNET/SteamVideo.cs deleted file mode 100644 index 1a612684..00000000 --- a/Src/SteamworksNET/SteamVideo.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SteamVideo -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class SteamVideo - { - public static void GetVideoURL(AppId_t unVideoAppID) - { - InteropHelp.TestIfAvailableClient(); - NativeMethods.ISteamVideo_GetVideoURL(unVideoAppID); - } - - public static bool IsBroadcasting(out int pnNumViewers) - { - InteropHelp.TestIfAvailableClient(); - return NativeMethods.ISteamVideo_IsBroadcasting(out pnNumViewers); - } - } -} diff --git a/Src/SteamworksNET/StopPlaytimeTrackingResult_t.cs b/Src/SteamworksNET/StopPlaytimeTrackingResult_t.cs deleted file mode 100644 index 1082381d..00000000 --- a/Src/SteamworksNET/StopPlaytimeTrackingResult_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.StopPlaytimeTrackingResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3411)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct StopPlaytimeTrackingResult_t - { - public const int k_iCallback = 3411; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/StoreAuthURLResponse_t.cs b/Src/SteamworksNET/StoreAuthURLResponse_t.cs deleted file mode 100644 index df2c3a33..00000000 --- a/Src/SteamworksNET/StoreAuthURLResponse_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.StoreAuthURLResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(165)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct StoreAuthURLResponse_t - { - public const int k_iCallback = 165; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] - public string m_szURL; - } -} diff --git a/Src/SteamworksNET/SubmitItemUpdateResult_t.cs b/Src/SteamworksNET/SubmitItemUpdateResult_t.cs deleted file mode 100644 index 3f7aa8a7..00000000 --- a/Src/SteamworksNET/SubmitItemUpdateResult_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.SubmitItemUpdateResult_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3404)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct SubmitItemUpdateResult_t - { - public const int k_iCallback = 3404; - public EResult m_eResult; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; - } -} diff --git a/Src/SteamworksNET/UGCFileWriteStreamHandle_t.cs b/Src/SteamworksNET/UGCFileWriteStreamHandle_t.cs deleted file mode 100644 index 0181dd26..00000000 --- a/Src/SteamworksNET/UGCFileWriteStreamHandle_t.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UGCFileWriteStreamHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct UGCFileWriteStreamHandle_t : - IEquatable, - IComparable - { - public static readonly UGCFileWriteStreamHandle_t Invalid = new UGCFileWriteStreamHandle_t(ulong.MaxValue); - public ulong m_UGCFileWriteStreamHandle; - - public UGCFileWriteStreamHandle_t(ulong value) => this.m_UGCFileWriteStreamHandle = value; - - public override string ToString() => this.m_UGCFileWriteStreamHandle.ToString(); - - public override bool Equals(object other) => other is UGCFileWriteStreamHandle_t writeStreamHandleT && this == writeStreamHandleT; - - public override int GetHashCode() => this.m_UGCFileWriteStreamHandle.GetHashCode(); - - public static bool operator ==(UGCFileWriteStreamHandle_t x, UGCFileWriteStreamHandle_t y) => (long) x.m_UGCFileWriteStreamHandle == (long) y.m_UGCFileWriteStreamHandle; - - public static bool operator !=(UGCFileWriteStreamHandle_t x, UGCFileWriteStreamHandle_t y) => !(x == y); - - public static explicit operator UGCFileWriteStreamHandle_t(ulong value) => new UGCFileWriteStreamHandle_t(value); - - public static explicit operator ulong(UGCFileWriteStreamHandle_t that) => that.m_UGCFileWriteStreamHandle; - - public bool Equals(UGCFileWriteStreamHandle_t other) => (long) this.m_UGCFileWriteStreamHandle == (long) other.m_UGCFileWriteStreamHandle; - - public int CompareTo(UGCFileWriteStreamHandle_t other) => this.m_UGCFileWriteStreamHandle.CompareTo(other.m_UGCFileWriteStreamHandle); - } -} diff --git a/Src/SteamworksNET/UGCHandle_t.cs b/Src/SteamworksNET/UGCHandle_t.cs deleted file mode 100644 index c9bd1b01..00000000 --- a/Src/SteamworksNET/UGCHandle_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UGCHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct UGCHandle_t : IEquatable, IComparable - { - public static readonly UGCHandle_t Invalid = new UGCHandle_t(ulong.MaxValue); - public ulong m_UGCHandle; - - public UGCHandle_t(ulong value) => this.m_UGCHandle = value; - - public override string ToString() => this.m_UGCHandle.ToString(); - - public override bool Equals(object other) => other is UGCHandle_t ugcHandleT && this == ugcHandleT; - - public override int GetHashCode() => this.m_UGCHandle.GetHashCode(); - - public static bool operator ==(UGCHandle_t x, UGCHandle_t y) => (long) x.m_UGCHandle == (long) y.m_UGCHandle; - - public static bool operator !=(UGCHandle_t x, UGCHandle_t y) => !(x == y); - - public static explicit operator UGCHandle_t(ulong value) => new UGCHandle_t(value); - - public static explicit operator ulong(UGCHandle_t that) => that.m_UGCHandle; - - public bool Equals(UGCHandle_t other) => (long) this.m_UGCHandle == (long) other.m_UGCHandle; - - public int CompareTo(UGCHandle_t other) => this.m_UGCHandle.CompareTo(other.m_UGCHandle); - } -} diff --git a/Src/SteamworksNET/UGCQueryHandle_t.cs b/Src/SteamworksNET/UGCQueryHandle_t.cs deleted file mode 100644 index 7124d984..00000000 --- a/Src/SteamworksNET/UGCQueryHandle_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UGCQueryHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct UGCQueryHandle_t : IEquatable, IComparable - { - public static readonly UGCQueryHandle_t Invalid = new UGCQueryHandle_t(ulong.MaxValue); - public ulong m_UGCQueryHandle; - - public UGCQueryHandle_t(ulong value) => this.m_UGCQueryHandle = value; - - public override string ToString() => this.m_UGCQueryHandle.ToString(); - - public override bool Equals(object other) => other is UGCQueryHandle_t ugcQueryHandleT && this == ugcQueryHandleT; - - public override int GetHashCode() => this.m_UGCQueryHandle.GetHashCode(); - - public static bool operator ==(UGCQueryHandle_t x, UGCQueryHandle_t y) => (long) x.m_UGCQueryHandle == (long) y.m_UGCQueryHandle; - - public static bool operator !=(UGCQueryHandle_t x, UGCQueryHandle_t y) => !(x == y); - - public static explicit operator UGCQueryHandle_t(ulong value) => new UGCQueryHandle_t(value); - - public static explicit operator ulong(UGCQueryHandle_t that) => that.m_UGCQueryHandle; - - public bool Equals(UGCQueryHandle_t other) => (long) this.m_UGCQueryHandle == (long) other.m_UGCQueryHandle; - - public int CompareTo(UGCQueryHandle_t other) => this.m_UGCQueryHandle.CompareTo(other.m_UGCQueryHandle); - } -} diff --git a/Src/SteamworksNET/UGCUpdateHandle_t.cs b/Src/SteamworksNET/UGCUpdateHandle_t.cs deleted file mode 100644 index 37b3496d..00000000 --- a/Src/SteamworksNET/UGCUpdateHandle_t.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UGCUpdateHandle_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct UGCUpdateHandle_t : IEquatable, IComparable - { - public static readonly UGCUpdateHandle_t Invalid = new UGCUpdateHandle_t(ulong.MaxValue); - public ulong m_UGCUpdateHandle; - - public UGCUpdateHandle_t(ulong value) => this.m_UGCUpdateHandle = value; - - public override string ToString() => this.m_UGCUpdateHandle.ToString(); - - public override bool Equals(object other) => other is UGCUpdateHandle_t ugcUpdateHandleT && this == ugcUpdateHandleT; - - public override int GetHashCode() => this.m_UGCUpdateHandle.GetHashCode(); - - public static bool operator ==(UGCUpdateHandle_t x, UGCUpdateHandle_t y) => (long) x.m_UGCUpdateHandle == (long) y.m_UGCUpdateHandle; - - public static bool operator !=(UGCUpdateHandle_t x, UGCUpdateHandle_t y) => !(x == y); - - public static explicit operator UGCUpdateHandle_t(ulong value) => new UGCUpdateHandle_t(value); - - public static explicit operator ulong(UGCUpdateHandle_t that) => that.m_UGCUpdateHandle; - - public bool Equals(UGCUpdateHandle_t other) => (long) this.m_UGCUpdateHandle == (long) other.m_UGCUpdateHandle; - - public int CompareTo(UGCUpdateHandle_t other) => this.m_UGCUpdateHandle.CompareTo(other.m_UGCUpdateHandle); - } -} diff --git a/Src/SteamworksNET/UserAchievementIconFetched_t.cs b/Src/SteamworksNET/UserAchievementIconFetched_t.cs deleted file mode 100644 index d4fc59c9..00000000 --- a/Src/SteamworksNET/UserAchievementIconFetched_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UserAchievementIconFetched_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1109)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct UserAchievementIconFetched_t - { - public const int k_iCallback = 1109; - public CGameID m_nGameID; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] - public string m_rgchAchievementName; - [MarshalAs(UnmanagedType.I1)] - public bool m_bAchieved; - public int m_nIconHandle; - } -} diff --git a/Src/SteamworksNET/UserAchievementStored_t.cs b/Src/SteamworksNET/UserAchievementStored_t.cs deleted file mode 100644 index 1e74fe92..00000000 --- a/Src/SteamworksNET/UserAchievementStored_t.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UserAchievementStored_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1103)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct UserAchievementStored_t - { - public const int k_iCallback = 1103; - public ulong m_nGameID; - [MarshalAs(UnmanagedType.I1)] - public bool m_bGroupAchievement; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] - public string m_rgchAchievementName; - public uint m_nCurProgress; - public uint m_nMaxProgress; - } -} diff --git a/Src/SteamworksNET/UserFavoriteItemsListChanged_t.cs b/Src/SteamworksNET/UserFavoriteItemsListChanged_t.cs deleted file mode 100644 index c1dc1c84..00000000 --- a/Src/SteamworksNET/UserFavoriteItemsListChanged_t.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UserFavoriteItemsListChanged_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(3407)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct UserFavoriteItemsListChanged_t - { - public const int k_iCallback = 3407; - public PublishedFileId_t m_nPublishedFileId; - public EResult m_eResult; - [MarshalAs(UnmanagedType.I1)] - public bool m_bWasAddRequest; - } -} diff --git a/Src/SteamworksNET/UserStatsReceived_t.cs b/Src/SteamworksNET/UserStatsReceived_t.cs deleted file mode 100644 index ff412fb7..00000000 --- a/Src/SteamworksNET/UserStatsReceived_t.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UserStatsReceived_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1101)] - [StructLayout(LayoutKind.Explicit, Pack = 8)] - public struct UserStatsReceived_t - { - public const int k_iCallback = 1101; - [FieldOffset(0)] - public ulong m_nGameID; - [FieldOffset(8)] - public EResult m_eResult; - [FieldOffset(12)] - public CSteamID m_steamIDUser; - } -} diff --git a/Src/SteamworksNET/UserStatsStored_t.cs b/Src/SteamworksNET/UserStatsStored_t.cs deleted file mode 100644 index 5900cef0..00000000 --- a/Src/SteamworksNET/UserStatsStored_t.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UserStatsStored_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1102)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct UserStatsStored_t - { - public const int k_iCallback = 1102; - public ulong m_nGameID; - public EResult m_eResult; - } -} diff --git a/Src/SteamworksNET/UserStatsUnloaded_t.cs b/Src/SteamworksNET/UserStatsUnloaded_t.cs deleted file mode 100644 index 13d0cb23..00000000 --- a/Src/SteamworksNET/UserStatsUnloaded_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.UserStatsUnloaded_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(1108)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct UserStatsUnloaded_t - { - public const int k_iCallback = 1108; - public CSteamID m_steamIDUser; - } -} diff --git a/Src/SteamworksNET/ValidateAuthTicketResponse_t.cs b/Src/SteamworksNET/ValidateAuthTicketResponse_t.cs deleted file mode 100644 index 2c17958a..00000000 --- a/Src/SteamworksNET/ValidateAuthTicketResponse_t.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.ValidateAuthTicketResponse_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(143)] - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct ValidateAuthTicketResponse_t - { - public const int k_iCallback = 143; - public CSteamID m_SteamID; - public EAuthSessionResponse m_eAuthSessionResponse; - public CSteamID m_OwnerSteamID; - } -} diff --git a/Src/SteamworksNET/Version.cs b/Src/SteamworksNET/Version.cs deleted file mode 100644 index 78220848..00000000 --- a/Src/SteamworksNET/Version.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.Version -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -namespace Steamworks -{ - public static class Version - { - public const string SteamworksNETVersion = "9.1.0"; - public const string SteamworksSDKVersion = "1.39"; - public const string SteamAPIDLLVersion = "03.75.32.07"; - public const int SteamAPIDLLSize = 219424; - public const int SteamAPI64DLLSize = 242976; - } -} diff --git a/Src/SteamworksNET/VolumeHasChanged_t.cs b/Src/SteamworksNET/VolumeHasChanged_t.cs deleted file mode 100644 index 2d9968cc..00000000 --- a/Src/SteamworksNET/VolumeHasChanged_t.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.VolumeHasChanged_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System.Runtime.InteropServices; - -namespace Steamworks -{ - [CallbackIdentity(4002)] - [StructLayout(LayoutKind.Sequential, Pack = 8)] - public struct VolumeHasChanged_t - { - public const int k_iCallback = 4002; - public float m_flNewVolume; - } -} diff --git a/Src/SteamworksNET/gameserveritem_t.cs b/Src/SteamworksNET/gameserveritem_t.cs deleted file mode 100644 index 75ad5669..00000000 --- a/Src/SteamworksNET/gameserveritem_t.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.gameserveritem_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace Steamworks -{ - [Serializable] - [StructLayout(LayoutKind.Sequential, Size = 372, Pack = 4)] - public class gameserveritem_t - { - public servernetadr_t m_NetAdr; - public int m_nPing; - [MarshalAs(UnmanagedType.I1)] - public bool m_bHadSuccessfulResponse; - [MarshalAs(UnmanagedType.I1)] - public bool m_bDoNotRefresh; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - private byte[] m_szGameDir; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - private byte[] m_szMap; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] - private byte[] m_szGameDescription; - public uint m_nAppID; - public int m_nPlayers; - public int m_nMaxPlayers; - public int m_nBotPlayers; - [MarshalAs(UnmanagedType.I1)] - public bool m_bPassword; - [MarshalAs(UnmanagedType.I1)] - public bool m_bSecure; - public uint m_ulTimeLastPlayed; - public int m_nServerVersion; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] - private byte[] m_szServerName; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - private byte[] m_szGameTags; - public CSteamID m_steamID; - - public string GetGameDir() => Encoding.UTF8.GetString(this.m_szGameDir, 0, Array.IndexOf(this.m_szGameDir, (byte) 0)); - - public void SetGameDir(string dir) => this.m_szGameDir = Encoding.UTF8.GetBytes(dir + "\0"); - - public string GetMap() => Encoding.UTF8.GetString(this.m_szMap, 0, Array.IndexOf(this.m_szMap, (byte) 0)); - - public void SetMap(string map) => this.m_szMap = Encoding.UTF8.GetBytes(map + "\0"); - - public string GetGameDescription() => Encoding.UTF8.GetString(this.m_szGameDescription, 0, Array.IndexOf(this.m_szGameDescription, (byte) 0)); - - public void SetGameDescription(string desc) => this.m_szGameDescription = Encoding.UTF8.GetBytes(desc + "\0"); - - public string GetServerName() => this.m_szServerName[0] == (byte) 0 ? this.m_NetAdr.GetConnectionAddressString() : Encoding.UTF8.GetString(this.m_szServerName, 0, Array.IndexOf(this.m_szServerName, (byte) 0)); - - public void SetServerName(string name) => this.m_szServerName = Encoding.UTF8.GetBytes(name + "\0"); - - public string GetGameTags() => Encoding.UTF8.GetString(this.m_szGameTags, 0, Array.IndexOf(this.m_szGameTags, (byte) 0)); - - public void SetGameTags(string tags) => this.m_szGameTags = Encoding.UTF8.GetBytes(tags + "\0"); - } -} diff --git a/Src/SteamworksNET/servernetadr_t.cs b/Src/SteamworksNET/servernetadr_t.cs deleted file mode 100644 index 70d05a65..00000000 --- a/Src/SteamworksNET/servernetadr_t.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Decompiled with JetBrains decompiler -// Type: Steamworks.servernetadr_t -// Assembly: Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null -// MVID: 03964DDB-6D2A-4A89-A283-51DA1C93775B -// Assembly location: C:\Users\Admin\Desktop\re\NET.dll - -using System; - -namespace Steamworks -{ - [Serializable] - public struct servernetadr_t - { - private ushort m_usConnectionPort; - private ushort m_usQueryPort; - private uint m_unIP; - - public void Init(uint ip, ushort usQueryPort, ushort usConnectionPort) - { - this.m_unIP = ip; - this.m_usQueryPort = usQueryPort; - this.m_usConnectionPort = usConnectionPort; - } - - public ushort GetQueryPort() => this.m_usQueryPort; - - public void SetQueryPort(ushort usPort) => this.m_usQueryPort = usPort; - - public ushort GetConnectionPort() => this.m_usConnectionPort; - - public void SetConnectionPort(ushort usPort) => this.m_usConnectionPort = usPort; - - public uint GetIP() => this.m_unIP; - - public void SetIP(uint unIP) => this.m_unIP = unIP; - - public string GetConnectionAddressString() => servernetadr_t.ToString(this.m_unIP, this.m_usConnectionPort); - - public string GetQueryAddressString() => servernetadr_t.ToString(this.m_unIP, this.m_usQueryPort); - - public static string ToString(uint unIP, ushort usPort) => string.Format("{0}.{1}.{2}.{3}:{4}", (object) (ulong) ((long) (unIP >> 24) & (long) byte.MaxValue), (object) (ulong) ((long) (unIP >> 16) & (long) byte.MaxValue), (object) (ulong) ((long) (unIP >> 8) & (long) byte.MaxValue), (object) (ulong) ((long) unIP & (long) byte.MaxValue), (object) usPort); - - public static bool operator <(servernetadr_t x, servernetadr_t y) - { - if (x.m_unIP < y.m_unIP) - return true; - return (int) x.m_unIP == (int) y.m_unIP && (int) x.m_usQueryPort < (int) y.m_usQueryPort; - } - - public static bool operator >(servernetadr_t x, servernetadr_t y) - { - if (x.m_unIP > y.m_unIP) - return true; - return (int) x.m_unIP == (int) y.m_unIP && (int) x.m_usQueryPort > (int) y.m_usQueryPort; - } - - public override bool Equals(object other) => other is servernetadr_t servernetadrT && this == servernetadrT; - - public override int GetHashCode() => this.m_unIP.GetHashCode() + this.m_usQueryPort.GetHashCode() + this.m_usConnectionPort.GetHashCode(); - - public static bool operator ==(servernetadr_t x, servernetadr_t y) => (int) x.m_unIP == (int) y.m_unIP && (int) x.m_usQueryPort == (int) y.m_usQueryPort && (int) x.m_usConnectionPort == (int) y.m_usConnectionPort; - - public static bool operator !=(servernetadr_t x, servernetadr_t y) => !(x == y); - - public bool Equals(servernetadr_t other) => (int) this.m_unIP == (int) other.m_unIP && (int) this.m_usQueryPort == (int) other.m_usQueryPort && (int) this.m_usConnectionPort == (int) other.m_usConnectionPort; - - public int CompareTo(servernetadr_t other) => this.m_unIP.CompareTo(other.m_unIP) + this.m_usQueryPort.CompareTo(other.m_usQueryPort) + this.m_usConnectionPort.CompareTo(other.m_usConnectionPort); - } -}