bf_write::WriteWord
0x00242910 · 132 bytes · __thiscall
_ZN8bf_write9WriteWordEj
Decompiled
undefined (2 params)
/* bf_write::WriteWord(unsigned int) */
void __thiscall bf_write::WriteWord(bf_write *this,uint param_1)
{
int iVar1;
uint uVar2;
uint *puVar3;
int iVar4;
uVar2 = *(uint *)(this + 0xc);
if ((int)(uVar2 + 0x10) <= *(int *)(this + 8)) {
iVar1 = ((int)uVar2 >> 5) * 4;
uVar2 = uVar2 & 0x1f;
puVar3 = (uint *)(*(int *)this + iVar1);
*puVar3 = *puVar3 & *(uint *)(&DAT_003f2de0 + uVar2 * 0x84) | param_1 << (sbyte)uVar2;
iVar4 = 0x20 - uVar2;
if (iVar4 < 0x10) {
puVar3 = (uint *)(*(int *)this + 4 + iVar1);
*puVar3 = (&g_BitWriteMasks)[0x10 - iVar4] & *puVar3 | param_1 >> ((byte)iVar4 & 0x1f);
}
*(int *)(this + 0xc) = *(int *)(this + 0xc) + 0x10;
return;
}
*(int *)(this + 0xc) = *(int *)(this + 8);
this[0x10] = (bf_write)0x1;
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.