Studio_PrefetchSequence
0x00b96370 · 218 bytes · __cdecl
_Z23Studio_PrefetchSequencePK10CStudioHdri
Decompiled
undefined (2 params)
/* Studio_PrefetchSequence(CStudioHdr const*, int) */
uint Studio_PrefetchSequence(CStudioHdr *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
mstudioanimdesc_t *this;
int iVar4;
int iVar5;
uint uVar6;
int iVar7;
int iVar8;
int local_34;
int local_20 [4];
iVar3 = CStudioHdr::pSeqdesc(param_1,param_2);
iVar1 = *(int *)(iVar3 + 0x44);
iVar2 = *(int *)(iVar3 + 0x48);
if (0 < iVar1) {
local_34 = 0;
uVar6 = 0;
do {
if (0 < iVar2) {
iVar7 = 0;
do {
iVar4 = *(int *)(iVar3 + 0x44);
iVar5 = iVar4 + -1;
if (local_34 < iVar4) {
iVar5 = local_34;
}
iVar8 = *(int *)(iVar3 + 0x48) + -1;
if (iVar7 < *(int *)(iVar3 + 0x48)) {
iVar8 = iVar7;
}
this = (mstudioanimdesc_t *)
CStudioHdr::pAnimdesc
(param_1,(int)*(short *)(iVar3 + (iVar8 * iVar4 + iVar5) * 2 +
*(int *)(iVar3 + 0x3c)));
local_20[0] = 0;
iVar4 = mstudioanimdesc_t::pAnim(this,local_20);
if (iVar4 == 0) {
uVar6 = 1;
}
iVar7 = iVar7 + 1;
} while (iVar7 != iVar2);
}
local_34 = local_34 + 1;
} while (local_34 != iVar1);
return uVar6 ^ 1;
}
return 1;
}
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.