std::__adjust_heap<int*,int,int,bool(*)(int_const&,int_const&)>
0x0022d280 · 283 bytes · unknown
_ZSt13__adjust_heapIPiiiPFbRKiS2_EEvT_T0_S6_T1_T2_
Decompiled
void (5 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<int*, int, int, bool (*)(int const&, int const&)>(int*, int, int, int,
bool (*)(int const&, int const&)) */
void std::__adjust_heap<int*,int,int,bool(*)(int_const&,int_const&)>
(int *param_1,int param_2,int param_3,int param_4,_func_bool_int_ptr_int_ptr *param_5
)
{
int iVar1;
bool bVar2;
int *piVar3;
int iVar4;
int iVar5;
int iVar6;
int local_20 [4];
iVar5 = (param_3 + -1) / 2;
iVar6 = param_2;
if (param_2 < iVar5) {
do {
iVar1 = iVar6 + 1;
iVar4 = iVar1 * 2;
piVar3 = param_1 + iVar1 * 2;
bVar2 = (*param_5)(piVar3,param_1 + iVar1 * 2 + -1);
if (bVar2) {
iVar4 = iVar4 + -1;
piVar3 = param_1 + iVar4;
}
param_1[iVar6] = *piVar3;
iVar6 = iVar4;
} while (iVar4 < iVar5);
}
else {
piVar3 = param_1 + param_2;
iVar4 = param_2;
}
if (((param_3 & 1U) == 0) && (iVar4 == (param_3 + -2) / 2)) {
iVar5 = iVar4 * 2;
iVar4 = iVar5 + 1;
*piVar3 = param_1[iVar5 + 1];
piVar3 = param_1 + iVar4;
}
if (param_2 < iVar4) {
local_20[0] = param_4;
do {
iVar5 = (iVar4 + -1) / 2;
piVar3 = param_1 + iVar5;
bVar2 = (*param_5)(piVar3,local_20);
if (!bVar2) {
param_1[iVar4] = local_20[0];
return;
}
param_1[iVar4] = *piVar3;
iVar4 = iVar5;
} while (param_2 < iVar5);
*piVar3 = local_20[0];
return;
}
*piVar3 = param_4;
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.