ConnectTier2Libraries
0x0028cd10 · 614 bytes · __cdecl
_Z21ConnectTier2LibrariesPPFPvPKcPiEi
Decompiled
undefined (2 params)
/* ConnectTier2Libraries(void* (**)(char const*, int*), int) */
void ConnectTier2Libraries(_func_void_ptr_char_ptr_int_ptr *param_1,int param_2)
{
int iVar1;
iVar1 = 0;
if (0 < param_2) {
do {
if (g_pFullFileSystem == 0) {
g_pFullFileSystem = (**(code **)param_1)("VFileSystem018",0);
}
if (materials == 0) {
g_pMaterialSystem = (**(code **)param_1)("VMaterialSystem080",0);
materials = g_pMaterialSystem;
}
if (g_pInputSystem == 0) {
g_pInputSystem = (**(code **)param_1)("InputSystemVersion001",0);
}
if (g_pNetworkSystem == 0) {
g_pNetworkSystem = (**(code **)param_1)("NetworkSystemVersion001",0);
}
if (g_pMaterialSystemHardwareConfig == 0) {
g_pMaterialSystemHardwareConfig = (**(code **)param_1)("MaterialSystemHardwareConfig013",0);
}
if (g_pMaterialSystemDebugTextureInfo == 0) {
g_pMaterialSystemDebugTextureInfo = (**(code **)param_1)("DebugTextureInfo001",0);
}
if (g_VBAllocTracker == 0) {
g_VBAllocTracker = (**(code **)param_1)("VBAllocTracker001",0);
}
if (colorcorrection == 0) {
colorcorrection = (**(code **)param_1)("COLORCORRECTION_VERSION_1",0);
}
if (p4 == 0) {
p4 = (**(code **)param_1)("VP4002",0);
}
if (mdllib == 0) {
mdllib = (**(code **)param_1)("VMDLLIB001",0);
}
if (g_pQueuedLoader == 0) {
g_pQueuedLoader = (**(code **)param_1)("QueuedLoaderVersion001",0);
}
if (g_pResourceAccessControl == 0) {
g_pResourceAccessControl = (**(code **)param_1)("VResourceAccessControl001",0);
}
if ((g_pPrecacheSystem == 0) &&
(g_pPrecacheSystem = (**(code **)param_1)("VPrecacheSystem001",0), g_pPrecacheSystem != 0))
{
CBaseResourcePrecacher::RegisterAll();
}
if (g_pMatchFramework == 0) {
g_pMatchFramework = (**(code **)param_1)("MATCHFRAMEWORK_001",0);
}
iVar1 = iVar1 + 1;
param_1 = param_1 + 4;
} while (iVar1 != param_2);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.