CBitRead::ReadBitVec3Coord
0x00b78420 · 467 bytes · __thiscall
_ZN8CBitRead16ReadBitVec3CoordER6Vector
Decompiled
undefined (2 params)
/* CBitRead::ReadBitVec3Coord(Vector&) */
void __thiscall CBitRead::ReadBitVec3Coord(CBitRead *this,Vector *param_1)
{
int iVar1;
uint uVar2;
uint *puVar3;
int iVar4;
uint *puVar5;
uint uVar6;
uint uVar7;
uint uVar8;
longdouble lVar9;
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
uVar2 = *(uint *)(this + 0x10);
iVar4 = *(int *)(this + 0x14);
iVar1 = iVar4 + -1;
*(int *)(this + 0x14) = iVar1;
if (iVar1 == 0) {
puVar3 = *(uint **)(this + 0x18);
*(undefined4 *)(this + 0x14) = 0x20;
puVar5 = *(uint **)(this + 0x1c);
if (puVar3 == puVar5) {
*(undefined4 *)(this + 0x10) = 0;
*(uint **)(this + 0x18) = puVar5 + 1;
uVar8 = 0;
goto LAB_00b78533;
}
if (puVar5 < puVar3) {
this[4] = (CBitRead)0x1;
uVar6 = 0;
uVar8 = 0;
}
else {
*(uint **)(this + 0x18) = puVar3 + 1;
uVar6 = *puVar3;
uVar8 = uVar6 & 1;
}
iVar4 = 0x1f;
LAB_00b78485:
uVar6 = uVar6 >> 1;
*(uint *)(this + 0x10) = uVar6;
uVar7 = uVar6 & 1;
*(int *)(this + 0x14) = iVar4 + -1;
if (iVar4 + -1 != 0) goto LAB_00b78556;
puVar5 = *(uint **)(this + 0x1c);
}
else {
uVar6 = uVar2 >> 1;
iVar4 = iVar4 + -2;
*(uint *)(this + 0x10) = uVar6;
uVar8 = uVar6 & 1;
*(int *)(this + 0x14) = iVar4;
if (iVar4 != 0) goto LAB_00b78485;
puVar5 = *(uint **)(this + 0x1c);
LAB_00b78533:
puVar3 = *(uint **)(this + 0x18);
*(undefined4 *)(this + 0x14) = 0x20;
if (puVar3 != puVar5) {
if (puVar5 < puVar3) {
this[4] = (CBitRead)0x1;
uVar7 = 0;
uVar6 = 0;
}
else {
*(uint **)(this + 0x18) = puVar3 + 1;
uVar6 = *puVar3;
uVar7 = uVar6 & 1;
}
*(undefined4 *)(this + 0x14) = 0x1f;
LAB_00b78556:
*(uint *)(this + 0x10) = uVar6 >> 1;
goto joined_r0x00b78560;
}
*(undefined4 *)(this + 0x10) = 0;
*(uint **)(this + 0x18) = puVar5 + 1;
uVar7 = 0;
}
puVar3 = *(uint **)(this + 0x18);
*(undefined4 *)(this + 0x14) = 0x20;
if (puVar3 == puVar5) {
*(undefined4 *)(this + 0x14) = 1;
*(undefined4 *)(this + 0x10) = 0;
*(uint **)(this + 0x18) = puVar5 + 1;
}
else if (puVar5 < puVar3) {
this[4] = (CBitRead)0x1;
*(undefined4 *)(this + 0x10) = 0;
}
else {
*(uint **)(this + 0x18) = puVar3 + 1;
*(uint *)(this + 0x10) = *puVar3;
}
joined_r0x00b78560:
if ((uVar2 & 1) != 0) {
lVar9 = (longdouble)ReadBitCoord(this);
*(float *)param_1 = (float)lVar9;
}
if (uVar8 != 0) {
lVar9 = (longdouble)ReadBitCoord(this);
*(float *)(param_1 + 4) = (float)lVar9;
}
if (uVar7 == 0) {
return;
}
lVar9 = (longdouble)ReadBitCoord(this);
*(float *)(param_1 + 8) = (float)lVar9;
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.