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
{
@ -19,7 +20,7 @@ public class Function
public string CallResult;
}
public List<Function> Functions = new List<Function>();
public List<Function> Functions = new List<Function>();
internal Function AddFunction( string funcName, string returnType, string args )
{

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;