mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Added missing callbacks
This commit is contained in:
parent
99c77f1997
commit
a40334551b
@ -41,6 +41,7 @@ internal static class CallbackIdentifiers
|
|||||||
public const int ClientRemoteClientManager = 3300;
|
public const int ClientRemoteClientManager = 3300;
|
||||||
public const int ClientUGC = 3400;
|
public const int ClientUGC = 3400;
|
||||||
public const int SteamStreamClient = 3500;
|
public const int SteamStreamClient = 3500;
|
||||||
|
public const int ClientProductBuilder = 3600;
|
||||||
public const int ClientShortcuts = 3700;
|
public const int ClientShortcuts = 3700;
|
||||||
public const int ClientRemoteControlManager = 3800;
|
public const int ClientRemoteControlManager = 3800;
|
||||||
public const int SteamAppList = 3900;
|
public const int SteamAppList = 3900;
|
||||||
@ -54,6 +55,7 @@ internal static class CallbackIdentifiers
|
|||||||
public const int ClientInventory = 4700;
|
public const int ClientInventory = 4700;
|
||||||
public const int ClientBluetoothManager = 4800;
|
public const int ClientBluetoothManager = 4800;
|
||||||
public const int ClientSharedConnection = 4900;
|
public const int ClientSharedConnection = 4900;
|
||||||
|
public const int SteamParentalSettings = 5000;
|
||||||
public const int ClientShader = 5100;
|
public const int ClientShader = 5100;
|
||||||
}
|
}
|
||||||
internal static class Defines
|
internal static class Defines
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -29,12 +29,12 @@ internal void ExtendDefinition( SteamApiDefinition def )
|
|||||||
//
|
//
|
||||||
def.CallbackIds = new Dictionary<string, int>();
|
def.CallbackIds = new Dictionary<string, int>();
|
||||||
{
|
{
|
||||||
var r = new Regex( @"enum { (k_i(?:.+)) = ([0-9]+) };" );
|
var r = new Regex( @"enum { (k_[i|I](?:.+)) = ([0-9]+) };" );
|
||||||
var ma = r.Matches( Content );
|
var ma = r.Matches( Content );
|
||||||
|
|
||||||
foreach ( Match m in ma )
|
foreach ( Match m in ma )
|
||||||
{
|
{
|
||||||
def.CallbackIds.Add( m.Groups[1].Value.Replace( "k_i", "" ).Replace( "Callbacks", "" ), int.Parse( m.Groups[2].Value ) );
|
def.CallbackIds.Add( m.Groups[1].Value.Substring( 3 ).Replace( "Callbacks", "" ), int.Parse( m.Groups[2].Value ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ internal void ExtendDefinition( SteamApiDefinition def )
|
|||||||
num = "0";
|
num = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
kName = kName.Replace( "k_i", "CallbackIdentifiers." ).Replace( "Callbacks", "" );
|
kName = "CallbackIdentifiers." + kName.Substring( 3 ).Replace( "Callbacks", "" );
|
||||||
|
|
||||||
t.CallbackId = $"{kName} + {num}";
|
t.CallbackId = $"{kName} + {num}";
|
||||||
}
|
}
|
||||||
@ -77,7 +77,8 @@ internal void ExtendDefinition( SteamApiDefinition def )
|
|||||||
var kName = m.Groups[1].Value;
|
var kName = m.Groups[1].Value;
|
||||||
var num = m.Groups[2].Value;
|
var num = m.Groups[2].Value;
|
||||||
|
|
||||||
kName = kName.Replace( "k_i", "CallbackIdentifiers." ).Replace( "Callbacks", "" );
|
//kName = kName.Replace( "k_i", "CallbackIdentifiers." ).Replace( "Callbacks", "" );
|
||||||
|
kName = "CallbackIdentifiers." + kName.Substring( 3 ).Replace( "Callbacks", "" );
|
||||||
|
|
||||||
t.CallbackId = $"{kName} + {num}";
|
t.CallbackId = $"{kName} + {num}";
|
||||||
}
|
}
|
||||||
@ -119,6 +120,25 @@ internal void ExtendDefinition( SteamApiDefinition def )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Find missing structs
|
||||||
|
//
|
||||||
|
{
|
||||||
|
var r = new Regex( @"struct ([a-zA-Z]+_t)" );
|
||||||
|
var ma = r.Matches( Content );
|
||||||
|
|
||||||
|
foreach ( Match m in ma )
|
||||||
|
{
|
||||||
|
var s = def.structs.SingleOrDefault( x => x.Name == m.Groups[1].Value );
|
||||||
|
if ( s == null )
|
||||||
|
{
|
||||||
|
Console.WriteLine( "Missing Struct: " + m.Groups[1].Value );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Console.ReadKey();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ void Structs()
|
|||||||
|
|
||||||
int defaultPack = 8;
|
int defaultPack = 8;
|
||||||
|
|
||||||
if ( c.Fields.Any( x => x.Type.Contains( "class CSteamID" ) ) && !ForceLargePackStructs.Contains( c.Name ) )
|
if ( c.Fields.Any( x => x.Type.Contains( "class CSteamID" ) ) && !ForceLargePackStructs.Contains( c.Name ) )
|
||||||
defaultPack = 4;
|
defaultPack = 4;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -60,7 +60,7 @@ void Structs()
|
|||||||
{
|
{
|
||||||
if ( !string.IsNullOrEmpty( c.CallbackId ) )
|
if ( !string.IsNullOrEmpty( c.CallbackId ) )
|
||||||
{
|
{
|
||||||
WriteLine( "internal const int CallbackId = " + c.CallbackId + ";" );
|
WriteLine( "internal const int CallbackId = " + c.CallbackId + ";" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -32,6 +32,11 @@ private static void AddMissing( SteamApiDefinition output )
|
|||||||
|
|
||||||
output.structs.AddRange( missing.structs );
|
output.structs.AddRange( missing.structs );
|
||||||
output.methods.AddRange( missing.methods );
|
output.methods.AddRange( missing.methods );
|
||||||
|
|
||||||
|
foreach ( var s in output.structs )
|
||||||
|
{
|
||||||
|
if ( s.Fields == null ) s.Fields = new SteamApiDefinition.StructDef.StructFields[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,229 +1,281 @@
|
|||||||
{
|
{
|
||||||
structs:
|
"structs":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
struct: "ItemInstalled_t",
|
"struct": "ItemInstalled_t",
|
||||||
fields:
|
"fields":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
fieldname: "m_unAppID",
|
"fieldname": "m_unAppID",
|
||||||
fieldtype: "AppId_t"
|
"fieldtype": "AppId_t"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "m_nPublishedFileId",
|
"fieldname": "m_nPublishedFileId",
|
||||||
fieldtype: "PublishedFileId_t"
|
"fieldtype": "PublishedFileId_t"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
],
|
|
||||||
|
|
||||||
methods:
|
{
|
||||||
[
|
"struct": "SteamInventoryDefinitionUpdate_t"
|
||||||
{
|
},
|
||||||
classname: "SteamApi",
|
|
||||||
methodname: "SteamAPI_Init",
|
{
|
||||||
returntype: "bool",
|
"struct": "SteamParentalSettingsChanged_t"
|
||||||
NeedsSelfPointer: false
|
},
|
||||||
},
|
|
||||||
|
{
|
||||||
{
|
"struct": "SteamServersConnected_t"
|
||||||
classname: "SteamApi",
|
},
|
||||||
methodname: "SteamAPI_RunCallbacks",
|
{
|
||||||
returntype: "void",
|
"struct": "NewLaunchQueryParameters_t"
|
||||||
NeedsSelfPointer: false
|
},
|
||||||
},
|
|
||||||
|
{
|
||||||
|
"struct": "GCMessageAvailable_t",
|
||||||
{
|
"fields":
|
||||||
classname: "SteamApi",
|
[
|
||||||
methodname: "SteamGameServer_RunCallbacks",
|
{
|
||||||
returntype: "void",
|
"fieldname": "m_nMessageSize",
|
||||||
NeedsSelfPointer: false
|
"fieldtype": "uint32"
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
classname: "SteamApi",
|
"struct": "GCMessageFailed_t"
|
||||||
methodname: "SteamAPI_RegisterCallback",
|
},
|
||||||
returntype: "void",
|
{
|
||||||
NeedsSelfPointer: false,
|
"struct": "ScreenshotRequested_t"
|
||||||
params:
|
},
|
||||||
[
|
{
|
||||||
{
|
"struct": "LicensesUpdated_t"
|
||||||
paramname: "pCallback",
|
},
|
||||||
paramtype: "void *"
|
{
|
||||||
},
|
"struct": "SteamShutdown_t"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
paramname: "callback",
|
"struct": "IPCountry_t"
|
||||||
paramtype: "int"
|
},
|
||||||
},
|
{
|
||||||
]
|
"struct": "IPCFailure_t",
|
||||||
},
|
"fields":
|
||||||
|
[
|
||||||
|
{
|
||||||
{
|
"fieldname": "m_eFailureType",
|
||||||
classname: "SteamApi",
|
"fieldtype": "uint8"
|
||||||
methodname: "SteamAPI_UnregisterCallback",
|
}
|
||||||
returntype: "void",
|
]
|
||||||
NeedsSelfPointer: false,
|
}
|
||||||
params:
|
],
|
||||||
[
|
|
||||||
{
|
"methods":
|
||||||
paramname: "pCallback",
|
[
|
||||||
paramtype: "void *"
|
{
|
||||||
}
|
"classname": "SteamApi",
|
||||||
]
|
"methodname": "SteamAPI_Init",
|
||||||
},
|
"returntype": "bool",
|
||||||
|
"NeedsSelfPointer": false
|
||||||
|
},
|
||||||
{
|
|
||||||
NeedsSelfPointer: false,
|
{
|
||||||
classname: "SteamApi",
|
"classname": "SteamApi",
|
||||||
methodname: "SteamAPI_RegisterCallResult",
|
"methodname": "SteamAPI_RunCallbacks",
|
||||||
returntype: "void",
|
"returntype": "void",
|
||||||
params:
|
"NeedsSelfPointer": false
|
||||||
[
|
},
|
||||||
{
|
|
||||||
paramname: "pCallback",
|
|
||||||
paramtype: "void *"
|
{
|
||||||
},
|
"classname": "SteamApi",
|
||||||
{
|
"methodname": "SteamGameServer_RunCallbacks",
|
||||||
paramname: "callback",
|
"returntype": "void",
|
||||||
paramtype: "SteamAPICall_t"
|
"NeedsSelfPointer": false
|
||||||
}
|
},
|
||||||
],
|
|
||||||
},
|
|
||||||
|
{
|
||||||
|
"classname": "SteamApi",
|
||||||
{
|
"methodname": "SteamAPI_RegisterCallback",
|
||||||
NeedsSelfPointer: false,
|
"returntype": "void",
|
||||||
classname: "SteamApi",
|
"NeedsSelfPointer": false,
|
||||||
methodname: "SteamAPI_UnregisterCallResult",
|
"params":
|
||||||
returntype: "void",
|
[
|
||||||
params:
|
{
|
||||||
[
|
"paramname": "pCallback",
|
||||||
{
|
"paramtype": "void *"
|
||||||
paramname: "pCallback",
|
},
|
||||||
paramtype: "void *"
|
|
||||||
},
|
{
|
||||||
{
|
"paramname": "callback",
|
||||||
paramname: "callback",
|
"paramtype": "int"
|
||||||
paramtype: "SteamAPICall_t"
|
}
|
||||||
}
|
]
|
||||||
]
|
},
|
||||||
},
|
|
||||||
|
|
||||||
|
{
|
||||||
{
|
"classname": "SteamApi",
|
||||||
NeedsSelfPointer: false,
|
"methodname": "SteamAPI_UnregisterCallback",
|
||||||
classname: "SteamApi",
|
"returntype": "void",
|
||||||
methodname: "SteamInternal_GameServer_Init",
|
"NeedsSelfPointer": false,
|
||||||
returntype: "bool",
|
"params":
|
||||||
params:
|
[
|
||||||
[
|
{
|
||||||
{
|
"paramname": "pCallback",
|
||||||
paramname: "unIP",
|
"paramtype": "void *"
|
||||||
paramtype: "uint32"
|
}
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
paramname: "usPort",
|
|
||||||
paramtype: "uint16"
|
|
||||||
},
|
{
|
||||||
{
|
"NeedsSelfPointer": false,
|
||||||
paramname: "usGamePort",
|
"classname": "SteamApi",
|
||||||
paramtype: "uint16"
|
"methodname": "SteamAPI_RegisterCallResult",
|
||||||
},
|
"returntype": "void",
|
||||||
{
|
"params":
|
||||||
paramname: "usQueryPort",
|
[
|
||||||
paramtype: "uint16"
|
{
|
||||||
},
|
"paramname": "pCallback",
|
||||||
{
|
"paramtype": "void *"
|
||||||
paramname: "eServerMode",
|
},
|
||||||
paramtype: "int"
|
{
|
||||||
},
|
"paramname": "callback",
|
||||||
{
|
"paramtype": "SteamAPICall_t"
|
||||||
paramname: "pchVersionString",
|
}
|
||||||
paramtype: "const char *"
|
]
|
||||||
}
|
},
|
||||||
],
|
|
||||||
},
|
|
||||||
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
{
|
"classname": "SteamApi",
|
||||||
NeedsSelfPointer: false,
|
"methodname": "SteamAPI_UnregisterCallResult",
|
||||||
classname: "SteamApi",
|
"returntype": "void",
|
||||||
methodname: "SteamAPI_Shutdown",
|
"params":
|
||||||
returntype: "void",
|
[
|
||||||
},
|
{
|
||||||
|
"paramname": "pCallback",
|
||||||
|
"paramtype": "void *"
|
||||||
{
|
},
|
||||||
NeedsSelfPointer: false,
|
{
|
||||||
classname: "SteamApi",
|
"paramname": "callback",
|
||||||
methodname: "SteamGameServer_Shutdown",
|
"paramtype": "SteamAPICall_t"
|
||||||
returntype: "void",
|
}
|
||||||
},
|
]
|
||||||
|
},
|
||||||
|
|
||||||
{
|
|
||||||
NeedsSelfPointer: false,
|
{
|
||||||
classname: "SteamApi",
|
"NeedsSelfPointer": false,
|
||||||
methodname: "SteamAPI_GetHSteamUser",
|
"classname": "SteamApi",
|
||||||
returntype: "HSteamUser",
|
"methodname": "SteamInternal_GameServer_Init",
|
||||||
},
|
"returntype": "bool",
|
||||||
|
"params":
|
||||||
|
[
|
||||||
{
|
{
|
||||||
NeedsSelfPointer: false,
|
"paramname": "unIP",
|
||||||
classname: "SteamApi",
|
"paramtype": "uint32"
|
||||||
methodname: "SteamAPI_GetHSteamPipe",
|
},
|
||||||
returntype: "HSteamPipe",
|
{
|
||||||
},
|
"paramname": "usPort",
|
||||||
|
"paramtype": "uint16"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NeedsSelfPointer: false,
|
"paramname": "usGamePort",
|
||||||
classname: "SteamApi",
|
"paramtype": "uint16"
|
||||||
methodname: "SteamGameServer_GetHSteamUser",
|
},
|
||||||
returntype: "HSteamUser",
|
{
|
||||||
},
|
"paramname": "usQueryPort",
|
||||||
|
"paramtype": "uint16"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NeedsSelfPointer: false,
|
"paramname": "eServerMode",
|
||||||
classname: "SteamApi",
|
"paramtype": "int"
|
||||||
methodname: "SteamGameServer_GetHSteamPipe",
|
},
|
||||||
returntype: "HSteamPipe",
|
{
|
||||||
},
|
"paramname": "pchVersionString",
|
||||||
|
"paramtype": "const char *"
|
||||||
|
}
|
||||||
{
|
]
|
||||||
NeedsSelfPointer: false,
|
},
|
||||||
classname: "SteamApi",
|
|
||||||
methodname: "SteamInternal_CreateInterface",
|
|
||||||
returntype: "void *",
|
{
|
||||||
params:
|
"NeedsSelfPointer": false,
|
||||||
[
|
"classname": "SteamApi",
|
||||||
{
|
"methodname": "SteamAPI_Shutdown",
|
||||||
paramname: "version",
|
"returntype": "void"
|
||||||
paramtype: "const char *"
|
},
|
||||||
}
|
|
||||||
],
|
|
||||||
},
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
{
|
"classname": "SteamApi",
|
||||||
NeedsSelfPointer: false,
|
"methodname": "SteamGameServer_Shutdown",
|
||||||
classname: "SteamApi",
|
"returntype": "void"
|
||||||
methodname: "SteamAPI_RestartAppIfNecessary",
|
},
|
||||||
returntype: "bool",
|
|
||||||
params:
|
|
||||||
[
|
{
|
||||||
{
|
"NeedsSelfPointer": false,
|
||||||
paramname: "unOwnAppID",
|
"classname": "SteamApi",
|
||||||
paramtype: "uint32"
|
"methodname": "SteamAPI_GetHSteamUser",
|
||||||
}
|
"returntype": "HSteamUser"
|
||||||
],
|
},
|
||||||
},
|
|
||||||
]
|
|
||||||
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
|
"classname": "SteamApi",
|
||||||
|
"methodname": "SteamAPI_GetHSteamPipe",
|
||||||
|
"returntype": "HSteamPipe"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
|
"classname": "SteamApi",
|
||||||
|
"methodname": "SteamGameServer_GetHSteamUser",
|
||||||
|
"returntype": "HSteamUser"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
|
"classname": "SteamApi",
|
||||||
|
"methodname": "SteamGameServer_GetHSteamPipe",
|
||||||
|
"returntype": "HSteamPipe"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
|
"classname": "SteamApi",
|
||||||
|
"methodname": "SteamInternal_CreateInterface",
|
||||||
|
"returntype": "void *",
|
||||||
|
"params":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"paramname": "version",
|
||||||
|
"paramtype": "const char *"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"NeedsSelfPointer": false,
|
||||||
|
"classname": "SteamApi",
|
||||||
|
"methodname": "SteamAPI_RestartAppIfNecessary",
|
||||||
|
"returntype": "bool",
|
||||||
|
"params":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"paramname": "unOwnAppID",
|
||||||
|
"paramtype": "uint32"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user