R_SetupDecalVertsForMSurface
0x0012f9b0 · 252 bytes · __cdecl
_Z28R_SetupDecalVertsForMSurfaceP7decal_tP11msurface2_tP6VectorP10CDecalVert
Decompiled
undefined (4 params)
/* R_SetupDecalVertsForMSurface(decal_t*, msurface2_t*, Vector*, CDecalVert*) */
void R_SetupDecalVertsForMSurface
(decal_t *param_1,msurface2_t *param_2,Vector *param_3,CDecalVert *param_4)
{
int iVar1;
float *pfVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
msurface2_t mVar8;
int iVar9;
int iVar10;
uint uVar11;
CDecalVert *pCVar12;
iVar9 = *(int *)(param_2 + 8);
iVar10 = *(int *)(DAT_003a172c + 0x88);
fVar3 = *(float *)(param_1 + 0x2c);
fVar4 = *(float *)(param_1 + 0x30);
mVar8 = param_2[3];
uVar11 = 0;
pCVar12 = param_4 + 0x18;
if (param_2[3] != (msurface2_t)0x0) {
do {
iVar1 = uVar11 * 2;
uVar11 = uVar11 + 1;
pfVar2 = (float *)(*(int *)(DAT_003a172c + 0x20) +
(uint)*(ushort *)(iVar10 + iVar9 * 2 + iVar1) * 0xc);
fVar5 = *pfVar2;
*(float *)param_4 = fVar5;
fVar6 = pfVar2[1];
*(float *)(param_4 + 4) = fVar6;
fVar7 = pfVar2[2];
*(float *)(param_4 + 8) = fVar7;
*(float *)(param_4 + 0x10) =
*(float *)(param_3 + 4) * fVar6 + *(float *)param_3 * fVar5 +
*(float *)(param_3 + 8) * fVar7 + (0.5 - fVar3);
*(float *)(param_4 + 0x14) =
fVar6 * *(float *)(param_3 + 0x10) + fVar5 * *(float *)(param_3 + 0xc) +
fVar7 * *(float *)(param_3 + 0x14) + (0.5 - fVar4);
*(undefined4 *)pCVar12 = 0;
*(undefined4 *)(pCVar12 + 4) = 0;
param_4 = param_4 + 0x20;
pCVar12 = pCVar12 + 0x20;
} while (uVar11 != (byte)mVar8);
}
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.