Studio_BuildMatrices
0x00b8d4f0 · 582 bytes · __cdecl
_Z20Studio_BuildMatricesPK10CStudioHdrRK11matrix3x4_tPK6VectorPK10QuaternioniPS2_i
Decompiled
undefined (7 params)
/* Studio_BuildMatrices(CStudioHdr const*, matrix3x4_t const&, Vector const*, Quaternion const*,
int, matrix3x4_t*, int) */
void Studio_BuildMatrices
(CStudioHdr *param_1,matrix3x4_t *param_2,Vector *param_3,Quaternion *param_4,
int param_5,matrix3x4_t *param_6,int param_7)
{
int iVar1;
int iVar2;
int iVar3;
int *piVar4;
matrix3x4_t local_27c [48];
matrix3x4_t local_24c [44];
int aiStack_220 [132];
if ((param_5 < -1) || (iVar1 = *(int *)(*(int *)param_1 + 0x9c), iVar1 <= param_5)) {
param_5 = 0;
}
else if (param_5 == -1) {
iVar3 = iVar1 + -1;
if (0 < iVar1) {
piVar4 = aiStack_220 + iVar1;
iVar2 = 0;
do {
*piVar4 = iVar2;
iVar2 = iVar2 + 1;
piVar4 = piVar4 + -1;
} while (iVar2 != iVar1);
}
goto LAB_00b8d53a;
}
iVar1 = *(int *)(param_1 + 0x40);
iVar2 = 0;
do {
iVar3 = iVar2;
aiStack_220[iVar3 + 1] = param_5;
param_5 = *(int *)(iVar1 + param_5 * 4);
iVar2 = iVar3 + 1;
} while (param_5 != -1);
LAB_00b8d53a:
MatrixCopy(param_2,local_24c);
if (((uint)param_6 & 0xf) == 0) {
if (-1 < iVar3) {
do {
iVar1 = aiStack_220[iVar3 + 1];
if ((param_7 & *(uint *)(*(int *)(param_1 + 0x2c) + iVar1 * 4)) != 0) {
QuaternionMatrix(param_4 + iVar1 * 0x10,param_3 + iVar1 * 0xc,local_27c);
iVar2 = *(int *)(*(int *)(param_1 + 0x40) + iVar1 * 4);
if (iVar2 == -1) {
ConcatTransforms_Aligned(local_24c,local_27c,param_6 + iVar1 * 0x30);
}
else {
ConcatTransforms_Aligned(param_6 + iVar2 * 0x30,local_27c,param_6 + iVar1 * 0x30);
}
}
iVar3 = iVar3 + -1;
} while (iVar3 != -1);
}
}
else if (-1 < iVar3) {
do {
while (iVar1 = aiStack_220[iVar3 + 1],
(param_7 & *(uint *)(*(int *)(param_1 + 0x2c) + iVar1 * 4)) != 0) {
QuaternionMatrix(param_4 + iVar1 * 0x10,param_3 + iVar1 * 0xc,local_27c);
iVar2 = *(int *)(*(int *)(param_1 + 0x40) + iVar1 * 4);
if (iVar2 == -1) {
ConcatTransforms(local_24c,local_27c,param_6 + iVar1 * 0x30);
break;
}
iVar3 = iVar3 + -1;
ConcatTransforms(param_6 + iVar2 * 0x30,local_27c,param_6 + iVar1 * 0x30);
if (iVar3 == -1) {
return;
}
}
iVar3 = iVar3 + -1;
} while (iVar3 != -1);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.