CDispCollTri::FindMinMax
0x000cb1b0 · 424 bytes · __thiscall
_ZN12CDispCollTri10FindMinMaxER11CDispVectorI6VectorE
Decompiled
undefined (2 params)
/* CDispCollTri::FindMinMax(CDispVector<Vector>&) */
void __thiscall CDispCollTri::FindMinMax(CDispCollTri *this,CDispVector *param_1)
{
int iVar1;
int iVar2;
float fVar3;
float fVar4;
int iVar5;
int iVar6;
char cVar7;
char cVar8;
float fVar9;
float fVar10;
iVar5 = *(int *)param_1;
iVar1 = (*(ushort *)(this + 2) & 0x1ff) * 0xc;
fVar3 = *(float *)(iVar5 + iVar1);
iVar6 = (*(ushort *)(this + 4) & 0x1ff) * 0xc;
iVar2 = (*(ushort *)this & 0x1ff) * 0xc;
fVar4 = *(float *)(iVar5 + iVar2);
fVar9 = fVar3;
if (fVar3 >= fVar4) {
fVar9 = fVar4;
}
cVar7 = '\x02';
if (fVar9 <= *(float *)(iVar5 + iVar6)) {
cVar7 = fVar3 < fVar4;
}
fVar9 = fVar3;
if (fVar4 >= fVar3) {
fVar9 = fVar4;
}
cVar8 = '\x02';
if (*(float *)(iVar5 + iVar6) <= fVar9) {
cVar8 = fVar4 < fVar3;
}
this[1] = (CDispCollTri)((byte)this[1] & 0xe1 | cVar7 * '\x02' | cVar8 << 3);
iVar5 = *(int *)param_1;
fVar3 = *(float *)(iVar5 + 4 + iVar1);
fVar4 = *(float *)(iVar5 + 4 + iVar2);
fVar9 = *(float *)(iVar5 + 4 + iVar6);
fVar10 = fVar3;
if (fVar3 >= fVar4) {
fVar10 = fVar4;
}
cVar7 = '\x02';
if (fVar10 <= fVar9) {
cVar7 = fVar3 < fVar4;
}
fVar10 = fVar3;
if (fVar4 >= fVar3) {
fVar10 = fVar4;
}
cVar8 = '\x02';
if (fVar9 <= fVar10) {
cVar8 = fVar4 < fVar3;
}
this[3] = (CDispCollTri)((byte)this[3] & 0xe1 | cVar7 * '\x02' | cVar8 << 3);
iVar5 = *(int *)param_1;
fVar3 = *(float *)(iVar5 + 8 + iVar6);
fVar4 = *(float *)(iVar5 + 8 + iVar1);
fVar9 = *(float *)(iVar5 + 8 + iVar2);
fVar10 = fVar4;
if (fVar4 >= fVar9) {
fVar10 = fVar9;
}
cVar7 = '\x02';
if (fVar10 <= fVar3) {
cVar7 = fVar4 < fVar9;
}
fVar10 = fVar4;
if (fVar9 >= fVar4) {
fVar10 = fVar9;
}
cVar8 = '\x02';
if (fVar3 <= fVar10) {
cVar8 = fVar9 < fVar4;
}
this[5] = (CDispCollTri)((byte)this[5] & 0xe1 | cVar7 * '\x02' | cVar8 << 3);
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.