old_bf_read::CheckReadUBitLong
0x00242dd0 · 133 bytes · __thiscall
_ZN11old_bf_read17CheckReadUBitLongEi
Decompiled
undefined (2 params)
/* old_bf_read::CheckReadUBitLong(int) */
uint __thiscall old_bf_read::CheckReadUBitLong(old_bf_read *this,int param_1)
{
byte bVar1;
int iVar2;
byte bVar3;
int iVar4;
uint local_18;
int local_14;
if (param_1 < 1) {
local_14 = *(int *)(this + 0xc);
local_18 = 0;
}
else {
iVar2 = *(int *)(this + 0xc);
local_14 = param_1 + iVar2;
local_18 = 0;
iVar4 = iVar2;
do {
bVar3 = (byte)iVar4;
bVar1 = *(byte *)(*(int *)this + (iVar4 >> 3));
iVar4 = iVar4 + 1;
*(int *)(this + 0xc) = iVar4;
local_18 = local_18 |
(uint)(((uint)bVar1 & 1 << (bVar3 & 7)) != 0) << (bVar3 - (char)iVar2 & 0x1f);
} while (iVar4 != local_14);
}
*(int *)(this + 0xc) = local_14 - param_1;
return local_18;
}
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.