bf_write::WriteBitVec3Coord
0x000991e0 · 427 bytes · __thiscall
_ZN8bf_write17WriteBitVec3CoordERK6Vector
Decompiled
undefined (2 params)
/* bf_write::WriteBitVec3Coord(Vector const&) */
void __thiscall bf_write::WriteBitVec3Coord(bf_write *this,Vector *param_1)
{
byte *pbVar1;
float fVar2;
bool bVar3;
bool bVar4;
bool bVar5;
int iVar6;
byte bVar7;
bVar3 = 0.03125 <= *(float *)param_1;
bVar4 = *(float *)param_1 <= -0.03125;
bVar5 = 0.03125 <= *(float *)(param_1 + 4) || *(float *)(param_1 + 4) <= -0.03125;
fVar2 = *(float *)(param_1 + 8);
iVar6 = *(int *)(this + 0xc);
if (iVar6 < *(int *)(this + 8)) {
if (this[0x10] == (bf_write)0x0) {
bVar7 = (byte)(1 << ((byte)iVar6 & 7));
if (bVar3 || bVar4) {
pbVar1 = (byte *)(*(int *)this + (iVar6 >> 3));
*pbVar1 = *pbVar1 | bVar7;
}
else {
pbVar1 = (byte *)(*(int *)this + (iVar6 >> 3));
*pbVar1 = *pbVar1 & ~bVar7;
}
iVar6 = *(int *)(this + 0xc) + 1;
*(int *)(this + 0xc) = iVar6;
if (*(int *)(this + 8) <= iVar6) goto LAB_00099320;
}
if (this[0x10] == (bf_write)0x0) {
bVar7 = (byte)(1 << ((byte)iVar6 & 7));
if (bVar5) {
pbVar1 = (byte *)(*(int *)this + (iVar6 >> 3));
*pbVar1 = *pbVar1 | bVar7;
}
else {
pbVar1 = (byte *)(*(int *)this + (iVar6 >> 3));
*pbVar1 = *pbVar1 & ~bVar7;
}
iVar6 = *(int *)(this + 0xc) + 1;
*(int *)(this + 0xc) = iVar6;
if (*(int *)(this + 8) <= iVar6) goto LAB_00099320;
}
if (this[0x10] == (bf_write)0x0) {
bVar7 = (byte)(1 << ((byte)iVar6 & 7));
if (0.03125 <= fVar2 || fVar2 <= -0.03125) {
pbVar1 = (byte *)(*(int *)this + (iVar6 >> 3));
*pbVar1 = *pbVar1 | bVar7;
}
else {
pbVar1 = (byte *)(*(int *)this + (iVar6 >> 3));
*pbVar1 = *pbVar1 & ~bVar7;
}
*(int *)(this + 0xc) = *(int *)(this + 0xc) + 1;
}
if (!bVar3 && !bVar4) goto joined_r0x00099342;
}
else {
LAB_00099320:
this[0x10] = (bf_write)0x1;
if (!bVar3 && !bVar4) goto joined_r0x00099342;
}
WriteBitCoord(this,*(float *)param_1);
joined_r0x00099342:
if (bVar5) {
WriteBitCoord(this,*(float *)(param_1 + 4));
}
if (0.03125 > fVar2 && fVar2 > -0.03125) {
return;
}
WriteBitCoord(this,*(float *)(param_1 + 8));
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.