R_SetupDecalTextureSpaceBasis
0x0012fe80 · 354 bytes · __cdecl
_Z29R_SetupDecalTextureSpaceBasisP7decal_tR6VectorP9IMaterialPS1_Pf
Decompiled
undefined (5 params)
/* R_SetupDecalTextureSpaceBasis(decal_t*, Vector&, IMaterial*, Vector*, float*) */
void R_SetupDecalTextureSpaceBasis
(decal_t *param_1,Vector *param_2,IMaterial *param_3,Vector *param_4,float *param_5)
{
float fVar1;
int iVar2;
Vector *pVVar3;
int iVar4;
int iVar5;
float fVar6;
float fVar7;
float local_24;
pVVar3 = (Vector *)0x0;
if (((byte)param_1[0x54] & 0x80) != 0) {
pVVar3 = (Vector *)(param_1 + 0x20);
}
R_DecalComputeBasis(param_2,pVVar3,param_4);
iVar4 = (**(code **)(*(int *)param_3 + 0x10))(param_3);
if (iVar4 < 2) {
iVar4 = 1;
local_24 = 1.0;
}
else {
iVar4 = (**(code **)(*(int *)param_3 + 0x10))(param_3);
local_24 = (float)iVar4;
}
iVar5 = (**(code **)(*(int *)param_3 + 0x14))(param_3);
if (iVar5 < 2) {
fVar6 = 1.0;
iVar5 = 1;
}
else {
iVar5 = (**(code **)(*(int *)param_3 + 0x14))(param_3);
fVar6 = (float)iVar5;
}
local_24 = *(float *)(param_1 + 0x34) / local_24;
*param_5 = local_24;
fVar1 = *(float *)(param_1 + 0x34);
param_5[1] = fVar1 / fVar6;
if (((byte)param_1[0x55] & 0x10) != 0) {
if (iVar4 < 0) {
iVar4 = iVar4 + 0x3f;
}
if (iVar5 < 0) {
iVar5 = iVar5 + 0x3f;
}
iVar2 = iVar5 >> 6;
if (iVar5 >> 6 < iVar4 >> 6) {
iVar2 = iVar4 >> 6;
}
fVar7 = (float)iVar2;
if (1.0 < fVar7) {
local_24 = local_24 * fVar7;
*param_5 = local_24;
param_5[1] = (fVar1 / fVar6) * fVar7;
}
}
*(float *)param_4 = *(float *)param_4 * local_24;
*(float *)(param_4 + 4) = *(float *)(param_4 + 4) * local_24;
*(float *)(param_4 + 8) = local_24 * *(float *)(param_4 + 8);
fVar6 = param_5[1];
*(float *)(param_4 + 0xc) = *(float *)(param_4 + 0xc) * fVar6;
*(float *)(param_4 + 0x10) = *(float *)(param_4 + 0x10) * fVar6;
*(float *)(param_4 + 0x14) = fVar6 * *(float *)(param_4 + 0x14);
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.