CStudioHdr::CActivityToSequenceMapping::GetSequences
0x0059efe0 · 223 bytes · __thiscall
_ZN10CStudioHdr26CActivityToSequenceMapping12GetSequencesEiPiS1_
Decompiled
undefined (4 params)
/* CStudioHdr::CActivityToSequenceMapping::GetSequences(int, int*, int*) */
int __thiscall
CStudioHdr::CActivityToSequenceMapping::GetSequences
(CActivityToSequenceMapping *this,int param_1,int *param_2,int *param_3)
{
undefined4 *puVar1;
int iVar2;
int iVar3;
uint uVar4;
uint uVar5;
uint uVar6;
int iVar7;
int *piVar8;
uint local_20;
uVar4 = HashInt(param_1);
if (this[0x1e] == (CActivityToSequenceMapping)0x0) {
local_20 = *(uint *)(this + 0x14);
uVar4 = uVar4 % local_20;
}
else {
uVar4 = uVar4 & *(uint *)(this + 0x20);
local_20 = *(uint *)(this + 0x14);
}
puVar1 = (undefined4 *)(*(int *)(this + 8) + uVar4 * 0x14);
uVar6 = puVar1[3];
if ((int)uVar6 < 1) {
if (uVar6 == 0) {
LAB_0059f03f:
uVar6 = 0xffff;
uVar4 = 0xffff;
if ((int)local_20 < 0x10000) {
return 0;
}
goto LAB_0059f07e;
}
LAB_0059f05f:
uVar5 = 0;
}
else {
piVar8 = (int *)*puVar1;
if (param_1 == *piVar8) goto LAB_0059f05f;
uVar5 = 0;
do {
piVar8 = piVar8 + 4;
uVar5 = uVar5 + 1;
if (uVar5 == uVar6) goto LAB_0059f03f;
} while (param_1 != *piVar8);
}
uVar6 = uVar5 & 0xffff;
uVar4 = (uVar4 << 0x10 | uVar5) >> 0x10;
if ((int)local_20 <= (int)uVar4) {
return 0;
}
LAB_0059f07e:
piVar8 = (int *)(*(int *)(this + 8) + uVar4 * 0x14);
if (piVar8[3] <= (int)uVar6) {
return 0;
}
iVar7 = uVar6 * 0x10 + *piVar8;
iVar2 = *(int *)this;
iVar3 = *(int *)(iVar7 + 4);
*param_2 = *(int *)(iVar7 + 8);
*param_3 = *(int *)(iVar7 + 0xc);
return iVar2 + iVar3 * 4;
}
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.