CBitWrite::SeekToBit
0x002568f0 · 102 bytes · __thiscall
_ZN9CBitWrite9SeekToBitEi
Decompiled
undefined (2 params)
/* CBitWrite::SeekToBit(int) */
void __thiscall CBitWrite::SeekToBit(CBitWrite *this,int param_1)
{
undefined4 *puVar1;
uint *puVar2;
int iVar3;
if (*(int *)(this + 0x14) != 0x20) {
puVar2 = *(uint **)(this + 0x18);
if (puVar2 == *(uint **)(this + 0x1c)) {
this[4] = (CBitWrite)0x1;
}
else {
*puVar2 = ~(&CBitBuffer::s_nMaskTable)[0x20 - *(int *)(this + 0x14)] & *puVar2 |
*(uint *)(this + 0x10);
}
}
this[0x24] = (CBitWrite)0x1;
iVar3 = param_1 + 0x1f;
if (-1 < param_1) {
iVar3 = param_1;
}
puVar1 = (undefined4 *)(*(int *)(this + 0x20) + (iVar3 >> 5) * 4);
*(undefined4 **)(this + 0x18) = puVar1;
*(undefined4 *)(this + 0x10) = *puVar1;
*(uint *)(this + 0x14) = 0x20 - (param_1 & 0x1fU);
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.