Interface string

This commit is contained in:
Garry Newman 2019-04-12 22:52:55 +01:00
parent 34d6b15fb8
commit afb2e286f4
4 changed files with 11 additions and 2 deletions

View File

@ -8,6 +8,8 @@ namespace Steamworks.Internal
{
public class ISteamApps : BaseSteamInterface
{
public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
public override void InitInternals()
{
BIsSubscribedDelegatePointer = Marshal.GetDelegateForFunctionPointer<BIsSubscribedDelegate>( Marshal.ReadIntPtr( VTable, 0) );

View File

@ -14,7 +14,7 @@ public abstract class BaseSteamInterface
public IntPtr Self;
public IntPtr VTable;
public virtual string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
public virtual string InterfaceName => null;
public BaseSteamInterface()
{

View File

@ -9,6 +9,7 @@ partial class CodeParser
public class Class
{
public string Name;
public string InterfaceString;
public class Function
{

View File

@ -40,6 +40,12 @@ public void ProcessClass( string fulldef, string classname, string inner )
var c = new Class();
c.Name = classname;
var interfaceMatch = Regex.Match( Content, $"#define {classname.ToUpper().Substring( 1 )}_INTERFACE_VERSION \"(.+?)\"" );
if ( interfaceMatch.Success )
{
c.InterfaceString = interfaceMatch.Groups[1].Value;
}
foreach ( var line in lines )
{
if ( line.Trim().Length < 4 ) continue;