VectorToColorRGBExp32
0x000ab4d0 · 144 bytes · __cdecl
_Z21VectorToColorRGBExp32RK6VectorR13ColorRGBExp32
Decompiled
undefined (2 params)
/* VectorToColorRGBExp32(Vector const&, ColorRGBExp32&) */
void VectorToColorRGBExp32(Vector *param_1,ColorRGBExp32 *param_2)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
int iVar5;
fVar1 = *(float *)param_1;
fVar2 = *(float *)(param_1 + 4);
fVar3 = *(float *)(param_1 + 8);
if (fVar1 <= fVar2) {
if (fVar3 < fVar2) {
param_1 = param_1 + 4;
goto LAB_000ab4f1;
}
}
else if (fVar3 < fVar1) {
LAB_000ab4f1:
fVar4 = *(float *)param_1;
goto joined_r0x000ab54e;
}
param_1 = param_1 + 8;
fVar4 = *(float *)param_1;
joined_r0x000ab54e:
if (fVar4 == 0.0) {
iVar5 = 0;
fVar4 = 1.0;
}
else {
iVar5 = (((uint)*(float *)param_1 & 0x7f800000) >> 0x17) - 0x86;
fVar4 = (float)((0x7f - iVar5) * 0x800000);
}
param_2[3] = SUB41(iVar5,0);
*param_2 = SUB41((int)(fVar1 * fVar4),0);
param_2[1] = SUB41((int)(fVar2 * fVar4),0);
param_2[2] = SUB41((int)(fVar4 * fVar3),0);
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.