mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 06:38:01 +03:00
Codegen
This commit is contained in:
parent
6dd32eb5c4
commit
09db39d9e3
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamAppList : SteamInterface
|
||||
internal unsafe partial class ISteamAppList : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamAppList( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamApps : SteamInterface
|
||||
internal unsafe partial class ISteamApps : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamApps( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamClient : SteamInterface
|
||||
internal unsafe partial class ISteamClient : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamClient( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamController : SteamInterface
|
||||
internal unsafe partial class ISteamController : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamController( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamFriends : SteamInterface
|
||||
internal unsafe partial class ISteamFriends : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamFriends( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamGameSearch : SteamInterface
|
||||
internal unsafe partial class ISteamGameSearch : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameSearch( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamGameServer : SteamInterface
|
||||
internal unsafe partial class ISteamGameServer : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameServer( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamGameServerStats : SteamInterface
|
||||
internal unsafe partial class ISteamGameServerStats : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameServerStats( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamHTMLSurface : SteamInterface
|
||||
internal unsafe partial class ISteamHTMLSurface : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamHTMLSurface( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamHTTP : SteamInterface
|
||||
internal unsafe partial class ISteamHTTP : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamHTTP( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamInput : SteamInterface
|
||||
internal unsafe partial class ISteamInput : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamInput( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamInventory : SteamInterface
|
||||
internal unsafe partial class ISteamInventory : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamInventory( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMatchmaking : SteamInterface
|
||||
internal unsafe partial class ISteamMatchmaking : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmaking( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMatchmakingPingResponse : SteamInterface
|
||||
internal unsafe partial class ISteamMatchmakingPingResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingPingResponse( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMatchmakingPlayersResponse : SteamInterface
|
||||
internal unsafe partial class ISteamMatchmakingPlayersResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingPlayersResponse( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMatchmakingRulesResponse : SteamInterface
|
||||
internal unsafe partial class ISteamMatchmakingRulesResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingRulesResponse( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMatchmakingServerListResponse : SteamInterface
|
||||
internal unsafe partial class ISteamMatchmakingServerListResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingServerListResponse( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMatchmakingServers : SteamInterface
|
||||
internal unsafe partial class ISteamMatchmakingServers : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingServers( bool IsGameServer )
|
||||
@ -106,24 +106,7 @@ namespace Steamworks
|
||||
var returnValue = _GetServerDetails( Self, hRequest, iServer );
|
||||
return returnValue.ToType<gameserveritem_t>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read gameserveritem_t.m_bHadSuccessfulResponse without allocating the struct on the heap
|
||||
/// </summary>
|
||||
/// <param name="hRequest"></param>
|
||||
/// <param name="iServer"></param>
|
||||
/// <returns></returns>
|
||||
internal bool HasServerResponded( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
IntPtr returnValue = _GetServerDetails( Self, hRequest, iServer );
|
||||
|
||||
// Return false if steam returned null
|
||||
if ( returnValue == IntPtr.Zero ) return false;
|
||||
|
||||
// first 8 bytes is IPAddress, next 4 bytes is ping, next 1 byte is m_bHadSuccessfulResponse
|
||||
return Marshal.ReadByte( IntPtr.Add( returnValue, 12 ) ) == 1;
|
||||
}
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelQuery( IntPtr self, HServerListRequest hRequest );
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMusic : SteamInterface
|
||||
internal unsafe partial class ISteamMusic : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMusic( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamMusicRemote : SteamInterface
|
||||
internal unsafe partial class ISteamMusicRemote : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMusicRemote( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamNetworking : SteamInterface
|
||||
internal unsafe partial class ISteamNetworking : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworking( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamNetworkingFakeUDPPort : SteamInterface
|
||||
internal unsafe partial class ISteamNetworkingFakeUDPPort : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingFakeUDPPort( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamNetworkingMessages : SteamInterface
|
||||
internal unsafe partial class ISteamNetworkingMessages : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingMessages( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamNetworkingSockets : SteamInterface
|
||||
internal unsafe partial class ISteamNetworkingSockets : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingSockets( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamNetworkingUtils : SteamInterface
|
||||
internal unsafe partial class ISteamNetworkingUtils : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingUtils( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamParentalSettings : SteamInterface
|
||||
internal unsafe partial class ISteamParentalSettings : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamParentalSettings( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamParties : SteamInterface
|
||||
internal unsafe partial class ISteamParties : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamParties( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamRemotePlay : SteamInterface
|
||||
internal unsafe partial class ISteamRemotePlay : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamRemotePlay( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamRemoteStorage : SteamInterface
|
||||
internal unsafe partial class ISteamRemoteStorage : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamRemoteStorage( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamScreenshots : SteamInterface
|
||||
internal unsafe partial class ISteamScreenshots : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamScreenshots( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamUGC : SteamInterface
|
||||
internal unsafe partial class ISteamUGC : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUGC( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamUser : SteamInterface
|
||||
internal unsafe partial class ISteamUser : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUser( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamUserStats : SteamInterface
|
||||
internal unsafe partial class ISteamUserStats : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUserStats( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamUtils : SteamInterface
|
||||
internal unsafe partial class ISteamUtils : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUtils( bool IsGameServer )
|
||||
|
@ -7,7 +7,7 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal unsafe class ISteamVideo : SteamInterface
|
||||
internal unsafe partial class ISteamVideo : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamVideo( bool IsGameServer )
|
||||
|
@ -25,17 +25,14 @@ namespace Steamworks.Data
|
||||
internal uint IP; // m_unIP uint32
|
||||
|
||||
}
|
||||
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
internal partial struct gameserveritem_t
|
||||
{
|
||||
internal servernetadr_t NetAdr; // m_NetAdr servernetadr_t
|
||||
internal int Ping; // m_nPing int
|
||||
|
||||
// NOTE: If you add fields above this you must change offset inISteamMatchmakingServers.HasServerResponded()
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool HadSuccessfulResponse; // m_bHadSuccessfulResponse bool
|
||||
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool DoNotRefresh; // m_bDoNotRefresh bool
|
||||
internal string GameDirUTF8() => System.Text.Encoding.UTF8.GetString( GameDir, 0, System.Array.IndexOf<byte>( GameDir, 0 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user