diff --git a/Generator/Cleanup.cs b/Generator/Cleanup.cs index 510b339..0091f3d 100644 --- a/Generator/Cleanup.cs +++ b/Generator/Cleanup.cs @@ -54,7 +54,7 @@ public static class Cleanup type = type.Replace( "ISteamNetworkingMessage", "NetMsg" ); type = type.Replace( "SteamNetworkingMessage_t", "NetMsg" ); - type = type.Replace( "RequestPlayersForGameResultCallback_t_PlayerAcceptState_t", "PlayerAcceptState_t" ); + type = type.Replace( "::", "." ); return type; } diff --git a/Generator/CodeWriter/Struct.cs b/Generator/CodeWriter/Struct.cs index fd315bb..5c23f1a 100644 --- a/Generator/CodeWriter/Struct.cs +++ b/Generator/CodeWriter/Struct.cs @@ -67,6 +67,14 @@ namespace Generator StructFields( c.Fields ); WriteLine(); + if ( c.Enums != null ) + { + foreach ( var e in c.Enums ) + { + WriteEnum( e, e.Name ); + } + } + } EndBlock(); WriteLine(); diff --git a/Generator/CodeWriter/StructCallbacks.cs b/Generator/CodeWriter/StructCallbacks.cs index b7f99ed..0c2e7bc 100644 --- a/Generator/CodeWriter/StructCallbacks.cs +++ b/Generator/CodeWriter/StructCallbacks.cs @@ -89,8 +89,16 @@ namespace Generator WriteLine( "#endregion" ); } - // if ( c.CallbackId ) ) - { + if ( c.Enums != null ) + { + foreach ( var e in c.Enums ) + { + WriteEnum( e, e.Name ); + } + } + + // if ( c.CallbackId ) ) + { callbackList.Add( c ); } diff --git a/Generator/SteamApiDefinition.cs b/Generator/SteamApiDefinition.cs index 02e52fa..eee815e 100644 --- a/Generator/SteamApiDefinition.cs +++ b/Generator/SteamApiDefinition.cs @@ -101,6 +101,8 @@ namespace Generator } } + public EnumDef[] Enums { get; set; } + } public List structs { get; set; }