Frustum_t::CullBox
0x0027ae90 · 173 bytes · __thiscall
_ZNK9Frustum_t7CullBoxERK6VectorS2_
Decompiled
undefined (3 params)
/* Frustum_t::CullBox(Vector const&, Vector const&) const */
undefined4 __thiscall Frustum_t::CullBox(Frustum_t *this,Vector *param_1,Vector *param_2)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
undefined4 in_ECX;
int iVar7;
int iVar8;
undefined1 auVar9 [16];
iVar8 = 0;
uVar1 = *(uint *)param_1;
uVar2 = *(uint *)(param_1 + 4);
uVar3 = *(uint *)(param_1 + 8);
uVar4 = *(uint *)param_2;
uVar5 = *(uint *)(param_2 + 4);
uVar6 = *(uint *)(param_2 + 8);
do {
auVar9._4_4_ = -(uint)((float)((uint)*(float *)(this + 0x44) & uVar1 |
~(uint)*(float *)(this + 0x44) & uVar4) * *(float *)(this + 4) +
(float)((uint)*(float *)(this + 0x54) & uVar2 |
~(uint)*(float *)(this + 0x54) & uVar5) * *(float *)(this + 0x14)
+ (float)((uint)*(float *)(this + 100) & uVar3 |
~(uint)*(float *)(this + 100) & uVar6) * *(float *)(this + 0x24)
< *(float *)(this + 0x34));
auVar9._0_4_ = -(uint)((float)((uint)*(float *)(this + 0x40) & uVar1 |
~(uint)*(float *)(this + 0x40) & uVar4) * *(float *)this +
(float)((uint)*(float *)(this + 0x50) & uVar2 |
~(uint)*(float *)(this + 0x50) & uVar5) * *(float *)(this + 0x10)
+ (float)((uint)*(float *)(this + 0x60) & uVar3 |
~(uint)*(float *)(this + 0x60) & uVar6) *
*(float *)(this + 0x20) < *(float *)(this + 0x30));
auVar9._8_4_ = -(uint)((float)((uint)*(float *)(this + 0x48) & uVar1 |
~(uint)*(float *)(this + 0x48) & uVar4) * *(float *)(this + 8) +
(float)((uint)*(float *)(this + 0x58) & uVar2 |
~(uint)*(float *)(this + 0x58) & uVar5) * *(float *)(this + 0x18)
+ (float)((uint)*(float *)(this + 0x68) & uVar3 |
~(uint)*(float *)(this + 0x68) & uVar6) *
*(float *)(this + 0x28) < *(float *)(this + 0x38));
auVar9._12_4_ =
-(uint)((float)((uint)*(float *)(this + 0x4c) & uVar1 |
~(uint)*(float *)(this + 0x4c) & uVar4) * *(float *)(this + 0xc) +
(float)((uint)*(float *)(this + 0x5c) & uVar2 |
~(uint)*(float *)(this + 0x5c) & uVar5) * *(float *)(this + 0x1c) +
(float)((uint)*(float *)(this + 0x6c) & uVar3 |
~(uint)*(float *)(this + 0x6c) & uVar6) * *(float *)(this + 0x2c) <
*(float *)(this + 0x3c));
iVar7 = movmskps(in_ECX,auVar9);
if (iVar7 != 0) {
return 1;
}
iVar8 = iVar8 + 1;
this = this + 0xa0;
in_ECX = 0;
} while (iVar8 != 2);
return 0;
}
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.