ConnectTier3Libraries
0x0028dab0 · 690 bytes · __cdecl
_Z21ConnectTier3LibrariesPPFPvPKcPiEi
Decompiled
undefined (2 params)
/* ConnectTier3Libraries(void* (**)(char const*, int*), int) */
void ConnectTier3Libraries(_func_void_ptr_char_ptr_int_ptr *param_1,int param_2)
{
int iVar1;
if (0 < param_2) {
iVar1 = 0;
do {
if (g_pStudioRender == 0) {
studiorender = (**(code **)param_1)("VStudioRender026",0);
g_pStudioRender = studiorender;
}
if (g_pVGui == 0) {
g_pVGui = (**(code **)param_1)("VGUI_ivgui008",0);
}
if (g_pVGuiInput == 0) {
g_pVGuiInput = (**(code **)param_1)("VGUI_Input005",0);
}
if (g_pVGuiPanel == 0) {
g_pVGuiPanel = (**(code **)param_1)("VGUI_Panel009",0);
}
if (g_pVGuiSurface == 0) {
g_pVGuiSurface = (**(code **)param_1)("VGUI_Surface031",0);
}
if (g_pVGuiSchemeManager == 0) {
g_pVGuiSchemeManager = (**(code **)param_1)("VGUI_Scheme010",0);
}
if (g_pVGuiSystem == 0) {
g_pVGuiSystem = (**(code **)param_1)("VGUI_System010",0);
}
if (g_pVGuiLocalize == 0) {
g_pVGuiLocalize = (**(code **)param_1)("VGUI_Localize005",0);
}
if (g_pMatSystemSurface == 0) {
g_pMatSystemSurface = (**(code **)param_1)("MatSystemSurface006",0);
}
if (g_pDataCache == 0) {
g_pDataCache = (**(code **)param_1)("VDataCache003",0);
}
if (g_pMDLCache == 0) {
mdlcache = (**(code **)param_1)("MDLCache004",0);
g_pMDLCache = mdlcache;
}
if (g_pAVI == 0) {
g_pAVI = (**(code **)param_1)("VAvi001",0);
}
if (g_pBIK == 0) {
g_pBIK = (**(code **)param_1)("VBik001",0);
}
if (g_pQuickTime == 0) {
g_pQuickTime = (**(code **)param_1)("IQuickTime001",0);
}
if (g_pPhysicsCollision == 0) {
g_pPhysicsCollision = (**(code **)param_1)("VPhysicsCollision007",0);
}
if (g_pSoundEmitterSystem == 0) {
g_pSoundEmitterSystem = (**(code **)param_1)("VSoundEmitter003",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.