CDeltaBitsWriter::CDeltaBitsWriter
0x00140d60 · 126 bytes · __thiscall
_ZN16CDeltaBitsWriterC1EP8bf_write
Decompiled
undefined (2 params)
/* CDeltaBitsWriter::CDeltaBitsWriter(bf_write*) */
void __thiscall CDeltaBitsWriter::CDeltaBitsWriter(CDeltaBitsWriter *this,bf_write *param_1)
{
int iVar1;
byte *pbVar2;
CDeltaBitsWriter CVar3;
*(undefined4 *)(this + 4) = 0xffffffff;
*(bf_write **)this = param_1;
CVar3 = (CDeltaBitsWriter)(*(int *)(sv_new_delta_bits._28_4_ + 0x30) != 0);
this[8] = CVar3;
iVar1 = *(int *)(param_1 + 0xc);
if ((bool)CVar3) {
if (iVar1 < *(int *)(param_1 + 8)) {
if (param_1[0x10] != (bf_write)0x0) {
return;
}
pbVar2 = (byte *)((iVar1 >> 3) + *(int *)param_1);
*pbVar2 = *pbVar2 | (byte)(1 << ((byte)iVar1 & 7));
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
return;
}
}
else if (iVar1 < *(int *)(param_1 + 8)) {
if (param_1[0x10] != (bf_write)0x0) {
return;
}
pbVar2 = (byte *)((iVar1 >> 3) + *(int *)param_1);
*pbVar2 = *pbVar2 & ~(byte)(1 << ((byte)iVar1 & 7));
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
return;
}
param_1[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.