Studio_BoneIndexByName
0x00b96230 · 144 bytes · __cdecl
_Z22Studio_BoneIndexByNamePK10CStudioHdrPKc
Decompiled
undefined (2 params)
/* Studio_BoneIndexByName(CStudioHdr const*, char const*) */
uint Studio_BoneIndexByName(CStudioHdr *param_1,char *param_2)
{
byte *pbVar1;
int iVar2;
int iVar3;
int iVar4;
int *piVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
iVar2 = *(int *)param_1;
iVar3 = *(int *)(iVar2 + 0x16c);
iVar4 = *(int *)(iVar2 + 0xa0);
iVar8 = *(int *)(iVar2 + 0x9c) + -1;
if (-1 < iVar8) {
iVar9 = 0;
do {
while( true ) {
iVar7 = iVar9 + iVar8 >> 1;
pbVar1 = (byte *)(iVar3 + iVar2 + iVar7);
piVar5 = (int *)((uint)*pbVar1 * 0xd8 + iVar4 + iVar2);
iVar6 = _V_stricmp((char *)((int)piVar5 + *piVar5),param_2);
if (-1 < iVar6) break;
iVar9 = iVar7 + 1;
if (iVar8 < iVar9) {
return 0xffffffff;
}
}
if (iVar6 == 0) {
return (uint)*pbVar1;
}
iVar8 = iVar7 + -1;
} while (iVar9 <= iVar8);
}
return 0xffffffff;
}
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.