CBitWrite::WriteBitVec3Coord
0x00b75660 · 521 bytes · __thiscall
_ZN9CBitWrite17WriteBitVec3CoordERK6Vector
Decompiled
undefined (2 params)
/* CBitWrite::WriteBitVec3Coord(Vector const&) */
void __thiscall CBitWrite::WriteBitVec3Coord(CBitWrite *this,Vector *param_1)
{
float fVar1;
float fVar2;
float fVar3;
int iVar4;
uint *puVar5;
char cVar6;
uint uVar7;
uint uVar8;
uint local_14;
fVar1 = *(float *)param_1;
if (0.03125 <= fVar1) {
fVar2 = *(float *)(param_1 + 4);
uVar7 = 1;
}
else {
fVar2 = *(float *)(param_1 + 4);
uVar7 = (uint)(fVar1 <= -0.03125);
}
if (fVar2 < 0.03125) {
fVar3 = *(float *)(param_1 + 8);
uVar8 = (uint)(fVar2 <= -0.03125);
}
else {
fVar3 = *(float *)(param_1 + 8);
uVar8 = 1;
}
if (0.03125 <= fVar3) {
local_14 = 1;
}
else {
local_14 = (uint)(fVar3 <= -0.03125);
}
iVar4 = *(int *)(this + 0x14);
cVar6 = (char)iVar4;
uVar7 = uVar7 << (0x20U - cVar6 & 0x1f) | *(uint *)(this + 0x10);
*(int *)(this + 0x14) = iVar4 + -1;
*(uint *)(this + 0x10) = uVar7;
if (iVar4 + -1 == 0) {
puVar5 = *(uint **)(this + 0x18);
if (puVar5 == *(uint **)(this + 0x1c)) {
this[4] = (CBitWrite)0x1;
}
else {
*(uint **)(this + 0x18) = puVar5 + 1;
*puVar5 = uVar7;
}
*(undefined4 *)(this + 0x14) = 0x1e;
*(uint *)(this + 0x10) = local_14 * 2 | uVar8;
}
else {
uVar7 = uVar8 << (0x21U - cVar6 & 0x1f) | uVar7;
*(uint *)(this + 0x10) = uVar7;
*(int *)(this + 0x14) = iVar4 + -2;
if (iVar4 + -2 == 0) {
puVar5 = *(uint **)(this + 0x18);
if (puVar5 == *(uint **)(this + 0x1c)) {
this[4] = (CBitWrite)0x1;
}
else {
*(uint **)(this + 0x18) = puVar5 + 1;
*puVar5 = uVar7;
}
*(undefined4 *)(this + 0x14) = 0x1f;
*(uint *)(this + 0x10) = local_14;
}
else {
*(int *)(this + 0x14) = iVar4 + -3;
uVar7 = local_14 << (0x22U - cVar6 & 0x1f) | uVar7;
*(uint *)(this + 0x10) = uVar7;
if (iVar4 + -3 == 0) {
puVar5 = *(uint **)(this + 0x18);
if (puVar5 == *(uint **)(this + 0x1c)) {
this[4] = (CBitWrite)0x1;
}
else {
*(uint **)(this + 0x18) = puVar5 + 1;
*puVar5 = uVar7;
}
*(undefined4 *)(this + 0x10) = 0;
*(undefined4 *)(this + 0x14) = 0x20;
}
}
}
if (0.03125 <= fVar1 || fVar1 <= -0.03125) {
WriteBitCoord(this,*(float *)param_1);
}
if (fVar2 >= 0.03125 || fVar2 <= -0.03125) {
WriteBitCoord(this,*(float *)(param_1 + 4));
}
if (0.03125 <= fVar3 || fVar3 <= -0.03125) {
WriteBitCoord(this,*(float *)(param_1 + 8));
return;
}
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.