diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs new file mode 100644 index 0000000..5920bf6 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs @@ -0,0 +1,135 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamScreenshots : SteamInterface + { + public ISteamScreenshots( bool server = false ) : base( server ) + { + } + + public override string InterfaceName => "STEAMSCREENSHOTS_INTERFACE_VERSION003"; + + public override void InitInternals() + { + WriteScreenshotDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 0) ); + AddScreenshotToLibraryDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 8) ); + TriggerScreenshotDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 16) ); + HookScreenshotsDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 24) ); + SetLocationDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 32) ); + TagUserDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 40) ); + TagPublishedFileDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 48) ); + IsScreenshotsHookedDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 56) ); + AddVRScreenshotToLibraryDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 64) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + private delegate ScreenshotHandle WriteScreenshotDelegate( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ); + private WriteScreenshotDelegate WriteScreenshotDelegatePointer; + + #endregion + internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ) + { + return WriteScreenshotDelegatePointer( Self, pubRGB, cubRGB, nWidth, nHeight ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + private delegate ScreenshotHandle AddScreenshotToLibraryDelegate( IntPtr self, string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight ); + private AddScreenshotToLibraryDelegate AddScreenshotToLibraryDelegatePointer; + + #endregion + internal ScreenshotHandle AddScreenshotToLibrary( string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight ) + { + return AddScreenshotToLibraryDelegatePointer( Self, pchFilename, pchThumbnailFilename, nWidth, nHeight ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + private delegate void TriggerScreenshotDelegate( IntPtr self ); + private TriggerScreenshotDelegate TriggerScreenshotDelegatePointer; + + #endregion + internal void TriggerScreenshot() + { + TriggerScreenshotDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + private delegate void HookScreenshotsDelegate( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook ); + private HookScreenshotsDelegate HookScreenshotsDelegatePointer; + + #endregion + internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook ) + { + HookScreenshotsDelegatePointer( Self, bHook ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + private delegate bool SetLocationDelegate( IntPtr self, ScreenshotHandle hScreenshot, string pchLocation ); + private SetLocationDelegate SetLocationDelegatePointer; + + #endregion + internal bool SetLocation( ScreenshotHandle hScreenshot, string pchLocation ) + { + return SetLocationDelegatePointer( Self, hScreenshot, pchLocation ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + private delegate bool TagUserDelegate( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID ); + private TagUserDelegate TagUserDelegatePointer; + + #endregion + internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID ) + { + return TagUserDelegatePointer( Self, hScreenshot, steamID ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + private delegate bool TagPublishedFileDelegate( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ); + private TagPublishedFileDelegate TagPublishedFileDelegatePointer; + + #endregion + internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ) + { + return TagPublishedFileDelegatePointer( Self, hScreenshot, unPublishedFileID ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + private delegate bool IsScreenshotsHookedDelegate( IntPtr self ); + private IsScreenshotsHookedDelegate IsScreenshotsHookedDelegatePointer; + + #endregion + internal bool IsScreenshotsHooked() + { + return IsScreenshotsHookedDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + private delegate ScreenshotHandle AddVRScreenshotToLibraryDelegate( IntPtr self, VRScreenshotType eType, string pchFilename, string pchVRFilename ); + private AddVRScreenshotToLibraryDelegate AddVRScreenshotToLibraryDelegatePointer; + + #endregion + internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, string pchFilename, string pchVRFilename ) + { + return AddVRScreenshotToLibraryDelegatePointer( Self, eType, pchFilename, pchVRFilename ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/SteamEnums.cs b/Facepunch.Steamworks/Generated/SteamEnums.cs index 6df2d48..6784701 100644 --- a/Facepunch.Steamworks/Generated/SteamEnums.cs +++ b/Facepunch.Steamworks/Generated/SteamEnums.cs @@ -21,7 +21,7 @@ namespace Steamworks // // EResult // - internal enum Result : int + public enum Result : int { OK = 1, Fail = 2, diff --git a/Facepunch.Steamworks/Generated/SteamStructs.cs b/Facepunch.Steamworks/Generated/SteamStructs.cs index 6e64083..3eee820 100644 --- a/Facepunch.Steamworks/Generated/SteamStructs.cs +++ b/Facepunch.Steamworks/Generated/SteamStructs.cs @@ -2429,7 +2429,7 @@ namespace Steamworks.Data internal struct RemoteStoragePublishFileResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -2443,7 +2443,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -2454,7 +2454,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -2466,7 +2466,7 @@ namespace Steamworks.Data internal struct RemoteStorageDeletePublishedFileResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientRemoteStorage + 11; @@ -2478,7 +2478,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageDeletePublishedFileResult_t ( RemoteStorageDeletePublishedFileResult_t.Pack4 d ) => new RemoteStorageDeletePublishedFileResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -2487,7 +2487,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageDeletePublishedFileResult_t ( RemoteStorageDeletePublishedFileResult_t.Pack8 d ) => new RemoteStorageDeletePublishedFileResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -2500,7 +2500,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientRemoteStorage + 12; @@ -2515,7 +2515,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] public static implicit operator RemoteStorageEnumerateUserPublishedFilesResult_t ( RemoteStorageEnumerateUserPublishedFilesResult_t.Pack4 d ) => new RemoteStorageEnumerateUserPublishedFilesResult_t{ Result = d.Result,ResultsReturned = d.ResultsReturned,TotalResultCount = d.TotalResultCount,GPublishedFileId = d.GPublishedFileId, }; } @@ -2527,7 +2527,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] public static implicit operator RemoteStorageEnumerateUserPublishedFilesResult_t ( RemoteStorageEnumerateUserPublishedFilesResult_t.Pack8 d ) => new RemoteStorageEnumerateUserPublishedFilesResult_t{ Result = d.Result,ResultsReturned = d.ResultsReturned,TotalResultCount = d.TotalResultCount,GPublishedFileId = d.GPublishedFileId, }; } @@ -2537,7 +2537,7 @@ namespace Steamworks.Data internal struct RemoteStorageSubscribePublishedFileResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientRemoteStorage + 13; @@ -2549,7 +2549,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageSubscribePublishedFileResult_t ( RemoteStorageSubscribePublishedFileResult_t.Pack4 d ) => new RemoteStorageSubscribePublishedFileResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -2558,7 +2558,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageSubscribePublishedFileResult_t ( RemoteStorageSubscribePublishedFileResult_t.Pack8 d ) => new RemoteStorageSubscribePublishedFileResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -2571,7 +2571,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] internal uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50] @@ -2588,7 +2588,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] internal uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50] @@ -2602,7 +2602,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] internal uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50] @@ -2614,7 +2614,7 @@ namespace Steamworks.Data internal struct RemoteStorageUnsubscribePublishedFileResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientRemoteStorage + 15; @@ -2626,7 +2626,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageUnsubscribePublishedFileResult_t ( RemoteStorageUnsubscribePublishedFileResult_t.Pack4 d ) => new RemoteStorageUnsubscribePublishedFileResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -2635,7 +2635,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageUnsubscribePublishedFileResult_t ( RemoteStorageUnsubscribePublishedFileResult_t.Pack8 d ) => new RemoteStorageUnsubscribePublishedFileResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -2645,7 +2645,7 @@ namespace Steamworks.Data internal struct RemoteStorageUpdatePublishedFileResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -2659,7 +2659,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -2670,7 +2670,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -2728,7 +2728,7 @@ namespace Steamworks.Data internal struct RemoteStorageGetPublishedFileDetailsResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint CreatorAppID; // m_nCreatorAppID AppId_t internal uint ConsumerAppID; // m_nConsumerAppID AppId_t [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)] @@ -2767,7 +2767,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint CreatorAppID; // m_nCreatorAppID AppId_t internal uint ConsumerAppID; // m_nConsumerAppID AppId_t [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)] @@ -2803,7 +2803,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint CreatorAppID; // m_nCreatorAppID AppId_t internal uint ConsumerAppID; // m_nConsumerAppID AppId_t [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)] @@ -2843,7 +2843,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.R4)] internal float[] GScore; // m_rgScore float [50] internal uint AppId; // m_nAppId AppId_t @@ -2862,7 +2862,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.R4)] internal float[] GScore; // m_rgScore float [50] internal uint AppId; // m_nAppId AppId_t @@ -2878,7 +2878,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.R4)] internal float[] GScore; // m_rgScore float [50] internal uint AppId; // m_nAppId AppId_t @@ -2892,7 +2892,7 @@ namespace Steamworks.Data internal struct RemoteStorageGetPublishedItemVoteDetailsResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_unPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_unPublishedFileId PublishedFileId_t internal int VotesFor; // m_nVotesFor int32 internal int VotesAgainst; // m_nVotesAgainst int32 internal int Reports; // m_nReports int32 @@ -2908,7 +2908,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_unPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_unPublishedFileId PublishedFileId_t internal int VotesFor; // m_nVotesFor int32 internal int VotesAgainst; // m_nVotesAgainst int32 internal int Reports; // m_nReports int32 @@ -2921,7 +2921,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_unPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_unPublishedFileId PublishedFileId_t internal int VotesFor; // m_nVotesFor int32 internal int VotesAgainst; // m_nVotesAgainst int32 internal int Reports; // m_nReports int32 @@ -2934,7 +2934,7 @@ namespace Steamworks.Data internal struct RemoteStoragePublishedFileSubscribed_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t #region ISteamCallback @@ -2946,7 +2946,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoteStoragePublishedFileSubscribed_t ( RemoteStoragePublishedFileSubscribed_t.Pack4 d ) => new RemoteStoragePublishedFileSubscribed_t{ PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -2955,7 +2955,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoteStoragePublishedFileSubscribed_t ( RemoteStoragePublishedFileSubscribed_t.Pack8 d ) => new RemoteStoragePublishedFileSubscribed_t{ PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -2965,7 +2965,7 @@ namespace Steamworks.Data internal struct RemoteStoragePublishedFileUnsubscribed_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t #region ISteamCallback @@ -2977,7 +2977,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoteStoragePublishedFileUnsubscribed_t ( RemoteStoragePublishedFileUnsubscribed_t.Pack4 d ) => new RemoteStoragePublishedFileUnsubscribed_t{ PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -2986,7 +2986,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoteStoragePublishedFileUnsubscribed_t ( RemoteStoragePublishedFileUnsubscribed_t.Pack8 d ) => new RemoteStoragePublishedFileUnsubscribed_t{ PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -2996,7 +2996,7 @@ namespace Steamworks.Data internal struct RemoteStoragePublishedFileDeleted_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t #region ISteamCallback @@ -3008,7 +3008,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoteStoragePublishedFileDeleted_t ( RemoteStoragePublishedFileDeleted_t.Pack4 d ) => new RemoteStoragePublishedFileDeleted_t{ PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -3017,7 +3017,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoteStoragePublishedFileDeleted_t ( RemoteStoragePublishedFileDeleted_t.Pack8 d ) => new RemoteStoragePublishedFileDeleted_t{ PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -3028,7 +3028,7 @@ namespace Steamworks.Data internal struct RemoteStorageUpdateUserPublishedItemVoteResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientRemoteStorage + 24; @@ -3040,7 +3040,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageUpdateUserPublishedItemVoteResult_t ( RemoteStorageUpdateUserPublishedItemVoteResult_t.Pack4 d ) => new RemoteStorageUpdateUserPublishedItemVoteResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -3049,7 +3049,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator RemoteStorageUpdateUserPublishedItemVoteResult_t ( RemoteStorageUpdateUserPublishedItemVoteResult_t.Pack8 d ) => new RemoteStorageUpdateUserPublishedItemVoteResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -3059,7 +3059,7 @@ namespace Steamworks.Data internal struct RemoteStorageUserVoteDetails_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal WorkshopVote Vote; // m_eVote enum EWorkshopVote #region ISteamCallback @@ -3072,7 +3072,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal WorkshopVote Vote; // m_eVote enum EWorkshopVote public static implicit operator RemoteStorageUserVoteDetails_t ( RemoteStorageUserVoteDetails_t.Pack4 d ) => new RemoteStorageUserVoteDetails_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,Vote = d.Vote, }; @@ -3082,7 +3082,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal WorkshopVote Vote; // m_eVote enum EWorkshopVote public static implicit operator RemoteStorageUserVoteDetails_t ( RemoteStorageUserVoteDetails_t.Pack8 d ) => new RemoteStorageUserVoteDetails_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,Vote = d.Vote, }; @@ -3096,7 +3096,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientRemoteStorage + 26; @@ -3111,7 +3111,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] public static implicit operator RemoteStorageEnumerateUserSharedWorkshopFilesResult_t ( RemoteStorageEnumerateUserSharedWorkshopFilesResult_t.Pack4 d ) => new RemoteStorageEnumerateUserSharedWorkshopFilesResult_t{ Result = d.Result,ResultsReturned = d.ResultsReturned,TotalResultCount = d.TotalResultCount,GPublishedFileId = d.GPublishedFileId, }; } @@ -3123,7 +3123,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] public static implicit operator RemoteStorageEnumerateUserSharedWorkshopFilesResult_t ( RemoteStorageEnumerateUserSharedWorkshopFilesResult_t.Pack8 d ) => new RemoteStorageEnumerateUserSharedWorkshopFilesResult_t{ Result = d.Result,ResultsReturned = d.ResultsReturned,TotalResultCount = d.TotalResultCount,GPublishedFileId = d.GPublishedFileId, }; } @@ -3133,7 +3133,7 @@ namespace Steamworks.Data internal struct RemoteStorageSetUserPublishedFileActionResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal WorkshopFileAction Action; // m_eAction enum EWorkshopFileAction #region ISteamCallback @@ -3146,7 +3146,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal WorkshopFileAction Action; // m_eAction enum EWorkshopFileAction public static implicit operator RemoteStorageSetUserPublishedFileActionResult_t ( RemoteStorageSetUserPublishedFileActionResult_t.Pack4 d ) => new RemoteStorageSetUserPublishedFileActionResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,Action = d.Action, }; @@ -3156,7 +3156,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal WorkshopFileAction Action; // m_eAction enum EWorkshopFileAction public static implicit operator RemoteStorageSetUserPublishedFileActionResult_t ( RemoteStorageSetUserPublishedFileActionResult_t.Pack8 d ) => new RemoteStorageSetUserPublishedFileActionResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,Action = d.Action, }; @@ -3171,7 +3171,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] internal uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50] @@ -3189,7 +3189,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] internal uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50] @@ -3204,7 +3204,7 @@ namespace Steamworks.Data internal int ResultsReturned; // m_nResultsReturned int32 internal int TotalResultCount; // m_nTotalResultCount int32 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] internal uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50] @@ -3249,7 +3249,7 @@ namespace Steamworks.Data internal struct RemoteStoragePublishedFileUpdated_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t internal ulong Unused; // m_ulUnused uint64 @@ -3262,7 +3262,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t internal ulong Unused; // m_ulUnused uint64 @@ -3272,7 +3272,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t internal ulong Unused; // m_ulUnused uint64 @@ -4462,7 +4462,7 @@ namespace Steamworks.Data internal struct SteamUGCDetails_t { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult internal WorkshopFileType FileType; // m_eFileType enum EWorkshopFileType internal uint CreatorAppID; // m_nCreatorAppID AppId_t @@ -4505,7 +4505,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult internal WorkshopFileType FileType; // m_eFileType enum EWorkshopFileType internal uint CreatorAppID; // m_nCreatorAppID AppId_t @@ -4546,7 +4546,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult internal WorkshopFileType FileType; // m_eFileType enum EWorkshopFileType internal uint CreatorAppID; // m_nCreatorAppID AppId_t @@ -4672,7 +4672,7 @@ namespace Steamworks.Data internal struct CreateItemResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -4686,7 +4686,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -4697,7 +4697,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool @@ -4711,7 +4711,7 @@ namespace Steamworks.Data internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientUGC + 4; @@ -4725,7 +4725,7 @@ namespace Steamworks.Data internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator SubmitItemUpdateResult_t ( SubmitItemUpdateResult_t.Pack4 d ) => new SubmitItemUpdateResult_t{ Result = d.Result,UserNeedsToAcceptWorkshopLegalAgreement = d.UserNeedsToAcceptWorkshopLegalAgreement,PublishedFileId = d.PublishedFileId, }; } @@ -4736,7 +4736,7 @@ namespace Steamworks.Data internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator SubmitItemUpdateResult_t ( SubmitItemUpdateResult_t.Pack8 d ) => new SubmitItemUpdateResult_t{ Result = d.Result,UserNeedsToAcceptWorkshopLegalAgreement = d.UserNeedsToAcceptWorkshopLegalAgreement,PublishedFileId = d.PublishedFileId, }; } @@ -4746,7 +4746,7 @@ namespace Steamworks.Data internal struct DownloadItemResult_t : Steamworks.ISteamCallback { internal uint AppID; // m_unAppID AppId_t - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult #region ISteamCallback @@ -4759,7 +4759,7 @@ namespace Steamworks.Data public struct Pack4 { internal uint AppID; // m_unAppID AppId_t - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult public static implicit operator DownloadItemResult_t ( DownloadItemResult_t.Pack4 d ) => new DownloadItemResult_t{ AppID = d.AppID,PublishedFileId = d.PublishedFileId,Result = d.Result, }; @@ -4769,7 +4769,7 @@ namespace Steamworks.Data public struct Pack8 { internal uint AppID; // m_unAppID AppId_t - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult public static implicit operator DownloadItemResult_t ( DownloadItemResult_t.Pack8 d ) => new DownloadItemResult_t{ AppID = d.AppID,PublishedFileId = d.PublishedFileId,Result = d.Result, }; @@ -4779,7 +4779,7 @@ namespace Steamworks.Data internal struct UserFavoriteItemsListChanged_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool WasAddRequest; // m_bWasAddRequest _Bool @@ -4793,7 +4793,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool WasAddRequest; // m_bWasAddRequest _Bool @@ -4804,7 +4804,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool WasAddRequest; // m_bWasAddRequest _Bool @@ -4816,7 +4816,7 @@ namespace Steamworks.Data internal struct SetUserItemVoteResult_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool VoteUp; // m_bVoteUp _Bool @@ -4830,7 +4830,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool VoteUp; // m_bVoteUp _Bool @@ -4841,7 +4841,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool VoteUp; // m_bVoteUp _Bool @@ -4853,7 +4853,7 @@ namespace Steamworks.Data internal struct GetUserItemVoteResult_t : Steamworks.ISteamCallback { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool VotedUp; // m_bVotedUp _Bool @@ -4871,7 +4871,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 4 )] public struct Pack4 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool VotedUp; // m_bVotedUp _Bool @@ -4886,7 +4886,7 @@ namespace Steamworks.Data [StructLayout( LayoutKind.Sequential, Pack = 8 )] public struct Pack8 { - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal Result Result; // m_eResult enum EResult [MarshalAs(UnmanagedType.I1)] internal bool VotedUp; // m_bVotedUp _Bool @@ -4959,8 +4959,8 @@ namespace Steamworks.Data internal struct AddUGCDependencyResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal ulong ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientUGC + 12; @@ -4972,8 +4972,8 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal ulong ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t public static implicit operator AddUGCDependencyResult_t ( AddUGCDependencyResult_t.Pack4 d ) => new AddUGCDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,ChildPublishedFileId = d.ChildPublishedFileId, }; } @@ -4982,8 +4982,8 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal ulong ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t public static implicit operator AddUGCDependencyResult_t ( AddUGCDependencyResult_t.Pack8 d ) => new AddUGCDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,ChildPublishedFileId = d.ChildPublishedFileId, }; } @@ -4993,8 +4993,8 @@ namespace Steamworks.Data internal struct RemoveUGCDependencyResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal ulong ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientUGC + 13; @@ -5006,8 +5006,8 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal ulong ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t public static implicit operator RemoveUGCDependencyResult_t ( RemoveUGCDependencyResult_t.Pack4 d ) => new RemoveUGCDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,ChildPublishedFileId = d.ChildPublishedFileId, }; } @@ -5016,8 +5016,8 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal ulong ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t public static implicit operator RemoveUGCDependencyResult_t ( RemoveUGCDependencyResult_t.Pack8 d ) => new RemoveUGCDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,ChildPublishedFileId = d.ChildPublishedFileId, }; } @@ -5027,7 +5027,7 @@ namespace Steamworks.Data internal struct AddAppDependencyResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t #region ISteamCallback @@ -5040,7 +5040,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator AddAppDependencyResult_t ( AddAppDependencyResult_t.Pack4 d ) => new AddAppDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -5050,7 +5050,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator AddAppDependencyResult_t ( AddAppDependencyResult_t.Pack8 d ) => new AddAppDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -5061,7 +5061,7 @@ namespace Steamworks.Data internal struct RemoveAppDependencyResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t #region ISteamCallback @@ -5074,7 +5074,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoveAppDependencyResult_t ( RemoveAppDependencyResult_t.Pack4 d ) => new RemoveAppDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -5084,7 +5084,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t internal uint AppID; // m_nAppID AppId_t public static implicit operator RemoveAppDependencyResult_t ( RemoveAppDependencyResult_t.Pack8 d ) => new RemoveAppDependencyResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId,AppID = d.AppID, }; @@ -5095,7 +5095,7 @@ namespace Steamworks.Data internal struct GetAppDependenciesResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.U4)] internal AppId_t[] GAppIDs; // m_rgAppIDs AppId_t [32] internal uint NumAppDependencies; // m_nNumAppDependencies uint32 @@ -5111,7 +5111,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.U4)] internal AppId_t[] GAppIDs; // m_rgAppIDs AppId_t [32] internal uint NumAppDependencies; // m_nNumAppDependencies uint32 @@ -5124,7 +5124,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.U4)] internal AppId_t[] GAppIDs; // m_rgAppIDs AppId_t [32] internal uint NumAppDependencies; // m_nNumAppDependencies uint32 @@ -5138,7 +5138,7 @@ namespace Steamworks.Data internal struct DeleteItemResult_t : Steamworks.ISteamCallback { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientUGC + 17; @@ -5150,7 +5150,7 @@ namespace Steamworks.Data public struct Pack4 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator DeleteItemResult_t ( DeleteItemResult_t.Pack4 d ) => new DeleteItemResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -5159,7 +5159,7 @@ namespace Steamworks.Data public struct Pack8 { internal Result Result; // m_eResult enum EResult - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator DeleteItemResult_t ( DeleteItemResult_t.Pack8 d ) => new DeleteItemResult_t{ Result = d.Result,PublishedFileId = d.PublishedFileId, }; } @@ -6895,7 +6895,7 @@ namespace Steamworks.Data internal struct ItemInstalled_t : Steamworks.ISteamCallback { internal uint AppID; // m_unAppID AppId_t - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t #region ISteamCallback public int GetCallbackId() => CallbackIdentifiers.ClientUGC + 5; @@ -6907,7 +6907,7 @@ namespace Steamworks.Data public struct Pack4 { internal uint AppID; // m_unAppID AppId_t - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator ItemInstalled_t ( ItemInstalled_t.Pack4 d ) => new ItemInstalled_t{ AppID = d.AppID,PublishedFileId = d.PublishedFileId, }; } @@ -6916,7 +6916,7 @@ namespace Steamworks.Data public struct Pack8 { internal uint AppID; // m_unAppID AppId_t - internal ulong PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t public static implicit operator ItemInstalled_t ( ItemInstalled_t.Pack8 d ) => new ItemInstalled_t{ AppID = d.AppID,PublishedFileId = d.PublishedFileId, }; } diff --git a/Facepunch.Steamworks/Generated/SteamTypes.cs b/Facepunch.Steamworks/Generated/SteamTypes.cs index 9c6ff3b..7655512 100644 --- a/Facepunch.Steamworks/Generated/SteamTypes.cs +++ b/Facepunch.Steamworks/Generated/SteamTypes.cs @@ -239,12 +239,12 @@ namespace Steamworks.Data public override string ToString() => Value.ToString(); } - internal struct PublishedFileId_t + public struct PublishedFileId { public ulong Value; - public static implicit operator PublishedFileId_t( ulong value ) => new PublishedFileId_t(){ Value = value }; - public static implicit operator ulong( PublishedFileId_t value ) => value.Value; + public static implicit operator PublishedFileId( ulong value ) => new PublishedFileId(){ Value = value }; + public static implicit operator ulong( PublishedFileId value ) => value.Value; public override string ToString() => Value.ToString(); } diff --git a/Facepunch.Steamworks/SteamClient.cs b/Facepunch.Steamworks/SteamClient.cs index a8a96d8..8ae764d 100644 --- a/Facepunch.Steamworks/SteamClient.cs +++ b/Facepunch.Steamworks/SteamClient.cs @@ -34,6 +34,7 @@ namespace Steamworks SteamVideo.InstallEvents(); SteamUser.InstallEvents(); SteamFriends.InstallEvents(); + SteamScreenshots.InstallEvents(); RunCallbacks(); } diff --git a/Facepunch.Steamworks/SteamScreenshots.cs b/Facepunch.Steamworks/SteamScreenshots.cs new file mode 100644 index 0000000..cafdbb4 --- /dev/null +++ b/Facepunch.Steamworks/SteamScreenshots.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + +namespace Steamworks +{ + /// + /// Undocumented Parental Settings + /// + public static class SteamScreenshots + { + static ISteamScreenshots _internal; + internal static ISteamScreenshots Internal + { + get + { + if ( _internal == null ) + _internal = new ISteamScreenshots(); + + return _internal; + } + } + + internal static void InstallEvents() + { + new Event( x => OnScreenshotRequested?.Invoke() ); + new Event( x => + { + if ( x.Result != Result.OK ) + OnScreenshotFailed?.Invoke( x.Result ); + else + OnScreenshotReady?.Invoke( new Screenshot { Value = x.Local } ); + } ); + } + + /// + /// A screenshot has been requested by the user from the Steam screenshot hotkey. + /// This will only be called if HookScreenshots has been enabled, in which case Steam + /// will not take the screenshot itself. + /// + public static event Action OnScreenshotRequested; + + /// + /// A screenshot successfully written or otherwise added to the library and can now be tagged. + /// + public static event Action OnScreenshotReady; + + /// + /// A screenshot attempt failed + /// + public static event Action OnScreenshotFailed; + + /// + /// Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. + /// The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + /// + public unsafe static Screenshot? WriteScreenshot( byte[] data, int width, int height ) + { + fixed ( byte* ptr = data ) + { + var handle = Internal.WriteScreenshot( (IntPtr)ptr, (uint)data.Length, width, height ); + if ( handle.Value == 0 ) return null; + + return new Screenshot { Value = handle }; + } + } + + /// + /// Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio + /// as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. + /// The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + /// JPEG, TGA, and PNG formats are supported. + /// + public unsafe static Screenshot? AddScreenshot( string filename, string thumbnail, int width, int height ) + { + var handle = Internal.AddScreenshotToLibrary( filename, thumbnail, width, height ); + if ( handle.Value == 0 ) return null; + + return new Screenshot { Value = handle }; + } + + /// + /// Causes the Steam overlay to take a screenshot. + /// If screenshots are being hooked by the game then a + /// ScreenshotRequested callback is sent back to the game instead. + /// + public static void TriggerScreenshot() => Internal.TriggerScreenshot(); + + /// + /// Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them. + /// Hooking is disabled by default, and only ever enabled if you do so with this function. + /// If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or + /// when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response. + /// + public static bool Hooked + { + get => Internal.IsScreenshotsHooked(); + set => Internal.HookScreenshots( value ); + } + } +} \ No newline at end of file diff --git a/Facepunch.Steamworks/Structs/Screenshot.cs b/Facepunch.Steamworks/Structs/Screenshot.cs new file mode 100644 index 0000000..2d6e920 --- /dev/null +++ b/Facepunch.Steamworks/Structs/Screenshot.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + + +namespace Steamworks.Data +{ + public struct Screenshot + { + internal ScreenshotHandle Value; + + /// + /// Tags a user as being visible in the screenshot + /// + public bool TagUser( SteamId user ) + { + return SteamScreenshots.Internal.TagUser( Value, user ); + } + + /// + /// Tags a user as being visible in the screenshot + /// + public bool SetLocation( string location ) + { + return SteamScreenshots.Internal.SetLocation( Value, location ); + } + + /// + /// Tags a user as being visible in the screenshot + /// + public bool TagPublishedFile( PublishedFileId file ) + { + return SteamScreenshots.Internal.TagPublishedFile( Value, file ); + } + } +} \ No newline at end of file diff --git a/Generator/Cleanup.cs b/Generator/Cleanup.cs index adccd48..54a454f 100644 --- a/Generator/Cleanup.cs +++ b/Generator/Cleanup.cs @@ -17,6 +17,7 @@ public static class Cleanup type = type.Replace( "AuthSessionResponse", "AuthResponse" ); type = type.Replace( "FriendRelationship", "Relationship" ); type = type.Replace( "BeginAuthSessionResult", "BeginAuthResult" ); + type = type.Replace( "PublishedFileId_t", "PublishedFileId" ); @@ -46,6 +47,8 @@ public static class Cleanup if ( name == "GamepadTextInputLineMode" ) return "public"; if ( name == "CheckFileSignature" ) return "public"; if ( name == "BroadcastUploadResult" ) return "public"; + if ( name == "PublishedFileId" ) return "public"; + if ( name == "Result" ) return "public"; return "internal"; } diff --git a/Generator/CodeWriter/CodeWriter.cs b/Generator/CodeWriter/CodeWriter.cs index edbf02a..f81602b 100644 --- a/Generator/CodeWriter/CodeWriter.cs +++ b/Generator/CodeWriter/CodeWriter.cs @@ -65,6 +65,8 @@ namespace Generator GenerateVTableClass( "ISteamMatchmakingServers", $"{folder}../Generated/Interfaces/ISteamMatchmakingServers.cs" ); GenerateVTableClass( "ISteamFriends", $"{folder}../Generated/Interfaces/ISteamFriends.cs" ); GenerateVTableClass( "ISteamGameServer", $"{folder}../Generated/Interfaces/ISteamGameServer.cs" ); + GenerateVTableClass( "ISteamGameServer", $"{folder}../Generated/Interfaces/ISteamGameServer.cs" ); + GenerateVTableClass( "ISteamScreenshots", $"{folder}../Generated/Interfaces/ISteamScreenshots.cs" ); } } diff --git a/Generator/CodeWriter/Struct.cs b/Generator/CodeWriter/Struct.cs index 89f2a63..905aecc 100644 --- a/Generator/CodeWriter/Struct.cs +++ b/Generator/CodeWriter/Struct.cs @@ -203,10 +203,10 @@ namespace Generator WriteLine( $"[MarshalAs(UnmanagedType.ByValArray, SizeConst = {num}, ArraySubType = UnmanagedType.U8)]" ); } - if ( t.StartsWith( "PublishedFileId_t " ) && t.Contains( "[" ) ) + if ( t.StartsWith( "PublishedFileId " ) && t.Contains( "[" ) ) { - var num = t.Replace( "PublishedFileId_t", "" ).Trim( '[', ']', ' ' ); - t = $"ulong[]"; + var num = t.Replace( "PublishedFileId", "" ).Trim( '[', ']', ' ' ); + t = $"PublishedFileId[]"; WriteLine( $"[MarshalAs(UnmanagedType.ByValArray, SizeConst = {num}, ArraySubType = UnmanagedType.U8)]" ); } diff --git a/Generator/CodeWriter/Types.cs b/Generator/CodeWriter/Types.cs index ec591fb..a024e4f 100644 --- a/Generator/CodeWriter/Types.cs +++ b/Generator/CodeWriter/Types.cs @@ -37,18 +37,20 @@ namespace Generator { foreach ( var o in def.typedefs.Where( x => !x.Name.Contains( "::" ) ) ) { + var typeName = Cleanup.ConvertType( o.Name ); + if ( SkipTypes.Contains( o.Name ) ) continue; if ( SkipTypesStartingWith.Any( x => o.Name.StartsWith( x ) ) ) continue; - StartBlock( $"{Cleanup.Expose( o.Name )} struct {o.Name}" ); + StartBlock( $"{Cleanup.Expose( typeName )} struct {typeName}" ); { WriteLine( $"public {ToManagedType( o.Type )} Value;" ); WriteLine(); - WriteLine( $"public static implicit operator {o.Name}( {ToManagedType( o.Type )} value ) => new {o.Name}(){{ Value = value }};" ); - WriteLine( $"public static implicit operator {ToManagedType( o.Type )}( {o.Name} value ) => value.Value;" ); + WriteLine( $"public static implicit operator {typeName}( {ToManagedType( o.Type )} value ) => new {typeName}(){{ Value = value }};" ); + WriteLine( $"public static implicit operator {ToManagedType( o.Type )}( {typeName} value ) => value.Value;" ); WriteLine( $"public override string ToString() => Value.ToString();" ); } EndBlock(); diff --git a/Generator/CodeWriter/Types/BaseType.cs b/Generator/CodeWriter/Types/BaseType.cs index b0e282b..a85b4bb 100644 --- a/Generator/CodeWriter/Types/BaseType.cs +++ b/Generator/CodeWriter/Types/BaseType.cs @@ -56,6 +56,7 @@ internal class BaseType get { if ( VarName == "pOut" ) return false; + if ( VarName == "pubRGB" ) return false; if ( VarName == "psteamIDClans" ) return true; if ( NativeType.EndsWith( "**" ) ) return true;