mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-23 20:17:58 +03:00
Moved missing api descriptions to steam_api_missing.json (was defined in code)
This commit is contained in:
parent
d944c6c7ae
commit
892edf371e
@ -14,7 +14,7 @@ namespace Generator
|
||||
var content = System.IO.File.ReadAllText( "steam_sdk/steam_api.json" );
|
||||
var def = Newtonsoft.Json.JsonConvert.DeserializeObject<SteamApiDefinition>( content );
|
||||
|
||||
AddExtras( def );
|
||||
AddMissing( def );
|
||||
|
||||
var parser = new CodeParser( @"steam_sdk" );
|
||||
|
||||
@ -25,235 +25,13 @@ namespace Generator
|
||||
generator.ToFolder( "../Facepunch.Steamworks/SteamNative/" );
|
||||
}
|
||||
|
||||
private static void AddExtras( SteamApiDefinition def )
|
||||
private static void AddMissing( SteamApiDefinition output )
|
||||
{
|
||||
def.structs.Add( new SteamApiDefinition.StructDef()
|
||||
{
|
||||
Name = "ItemInstalled_t",
|
||||
Fields = new SteamApiDefinition.StructDef.StructFields[]
|
||||
{
|
||||
new SteamApiDefinition.StructDef.StructFields()
|
||||
{
|
||||
Name = "m_unAppID",
|
||||
Type = "AppId_t"
|
||||
},
|
||||
new SteamApiDefinition.StructDef.StructFields()
|
||||
{
|
||||
Name = "m_nPublishedFileId",
|
||||
Type = "PublishedFileId_t"
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_Init",
|
||||
ReturnType = "bool",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_RunCallbacks",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamGameServer_RunCallbacks",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_RegisterCallback",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false,
|
||||
Params = new SteamApiDefinition.MethodDef.ParamType[]
|
||||
{
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "pCallback",
|
||||
Type = "void *"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "callback",
|
||||
Type = "int"
|
||||
},
|
||||
}
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_UnregisterCallback",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false,
|
||||
Params = new SteamApiDefinition.MethodDef.ParamType[]
|
||||
{
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "pCallback",
|
||||
Type = "void *"
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_RegisterCallResult",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false,
|
||||
Params = new SteamApiDefinition.MethodDef.ParamType[]
|
||||
{
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "pCallback",
|
||||
Type = "void *"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "callback",
|
||||
Type = "SteamAPICall_t"
|
||||
},
|
||||
}
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_UnregisterCallResult",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false,
|
||||
Params = new SteamApiDefinition.MethodDef.ParamType[]
|
||||
{
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "pCallback",
|
||||
Type = "void *"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "callback",
|
||||
Type = "SteamAPICall_t"
|
||||
},
|
||||
}
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamInternal_GameServer_Init",
|
||||
ReturnType = "bool",
|
||||
NeedsSelfPointer = false,
|
||||
Params = new SteamApiDefinition.MethodDef.ParamType[]
|
||||
{
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "unIP",
|
||||
Type = "uint32"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "usPort",
|
||||
Type = "uint16"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "usGamePort",
|
||||
Type = "uint16"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "usQueryPort",
|
||||
Type = "uint16"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "eServerMode",
|
||||
Type = "int"
|
||||
},
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "pchVersionString",
|
||||
Type = "const char *"
|
||||
}
|
||||
},
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_Shutdown",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamGameServer_Shutdown",
|
||||
ReturnType = "void",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_GetHSteamUser",
|
||||
ReturnType = "HSteamUser",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamAPI_GetHSteamPipe",
|
||||
ReturnType = "HSteamPipe",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamGameServer_GetHSteamUser",
|
||||
ReturnType = "HSteamUser",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamGameServer_GetHSteamPipe",
|
||||
ReturnType = "HSteamPipe",
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
|
||||
def.methods.Add( new SteamApiDefinition.MethodDef()
|
||||
{
|
||||
ClassName = "SteamApi",
|
||||
Name = "SteamInternal_CreateInterface",
|
||||
ReturnType = "void *",
|
||||
Params = new SteamApiDefinition.MethodDef.ParamType[]
|
||||
{
|
||||
new SteamApiDefinition.MethodDef.ParamType()
|
||||
{
|
||||
Name = "version",
|
||||
Type = "const char *"
|
||||
}
|
||||
},
|
||||
NeedsSelfPointer = false
|
||||
} );
|
||||
var content = System.IO.File.ReadAllText( "steam_api_missing.json" );
|
||||
var missing = Newtonsoft.Json.JsonConvert.DeserializeObject<SteamApiDefinition>( content );
|
||||
|
||||
output.structs.AddRange( missing.structs );
|
||||
output.methods.AddRange( missing.methods );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
215
Generator/steam_api_missing.json
Normal file
215
Generator/steam_api_missing.json
Normal file
@ -0,0 +1,215 @@
|
||||
{
|
||||
structs:
|
||||
[
|
||||
{
|
||||
struct: "ItemInstalled_t",
|
||||
fields:
|
||||
[
|
||||
{
|
||||
fieldname: "m_unAppID",
|
||||
fieldtype: "AppId_t"
|
||||
},
|
||||
{
|
||||
fieldname: "m_nPublishedFileId",
|
||||
fieldtype: "PublishedFileId_t"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
methods:
|
||||
[
|
||||
{
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_Init",
|
||||
returntype: "bool",
|
||||
NeedsSelfPointer: false
|
||||
},
|
||||
|
||||
{
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_RunCallbacks",
|
||||
returntype: "void",
|
||||
NeedsSelfPointer: false
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamGameServer_RunCallbacks",
|
||||
returntype: "void",
|
||||
NeedsSelfPointer: false
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_RegisterCallback",
|
||||
returntype: "void",
|
||||
NeedsSelfPointer: false,
|
||||
params:
|
||||
[
|
||||
{
|
||||
paramname: "pCallback",
|
||||
paramtype: "void *"
|
||||
},
|
||||
|
||||
{
|
||||
paramname: "callback",
|
||||
paramtype: "int"
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_UnregisterCallback",
|
||||
returntype: "void",
|
||||
NeedsSelfPointer: false,
|
||||
params:
|
||||
[
|
||||
{
|
||||
paramname: "pCallback",
|
||||
paramtype: "void *"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
NeedsSelfPointer: false,
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_RegisterCallResult",
|
||||
returntype: "void",
|
||||
params:
|
||||
[
|
||||
{
|
||||
paramname: "pCallback",
|
||||
paramtype: "void *"
|
||||
},
|
||||
{
|
||||
paramname: "callback",
|
||||
paramtype: "SteamAPICall_t"
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
NeedsSelfPointer: false,
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_UnregisterCallResult",
|
||||
returntype: "void",
|
||||
params:
|
||||
[
|
||||
{
|
||||
paramname: "pCallback",
|
||||
paramtype: "void *"
|
||||
},
|
||||
{
|
||||
paramname: "callback",
|
||||
paramtype: "SteamAPICall_t"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
NeedsSelfPointer: false,
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamInternal_GameServer_Init",
|
||||
returntype: "bool",
|
||||
params:
|
||||
[
|
||||
{
|
||||
paramname: "unIP",
|
||||
paramtype: "uint32"
|
||||
},
|
||||
{
|
||||
paramname: "usPort",
|
||||
paramtype: "uint16"
|
||||
},
|
||||
{
|
||||
paramname: "usGamePort",
|
||||
paramtype: "uint16"
|
||||
},
|
||||
{
|
||||
paramname: "usQueryPort",
|
||||
paramtype: "uint16"
|
||||
},
|
||||
{
|
||||
paramname: "eServerMode",
|
||||
paramtype: "int"
|
||||
},
|
||||
{
|
||||
paramname: "pchVersionString",
|
||||
paramtype: "const char *"
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
NeedsSelfPointer: false,
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamAPI_Shutdown",
|
||||
returntype: "void",
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
NeedsSelfPointer: false,
|
||||
classname: "SteamApi",
|
||||
methodname: "SteamGameServer_Shutdown",
|
||||
returntype: "void",
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
NeedsSelfPointer: false,
|
||||
classname: "SteamApi",
|
||||
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 *"
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user