CParticleSystemDefinition::ParseOperators
0x00bcf6a0 · 823 bytes · __thiscall
_ZN25CParticleSystemDefinition14ParseOperatorsEPKc22ParticleFunctionType_tP11CDmxElementR10CUtlVectorIP25CParticleOperatorInstance10CUtlMemoryIS7_iEE
Decompiled
undefined (5 params)
/* CParticleSystemDefinition::ParseOperators(char const*, ParticleFunctionType_t, CDmxElement*,
CUtlVector<CParticleOperatorInstance*, CUtlMemory<CParticleOperatorInstance*, int> >&) */
void __thiscall
CParticleSystemDefinition::ParseOperators
(CParticleSystemDefinition *this,char *param_1,uint param_3,CDmxElement *param_4,
CUtlVector<CParticleOperatorInstance*,CUtlMemory<CParticleOperatorInstance*,int>> *param_5
)
{
int *piVar1;
int iVar2;
char *pcVar3;
undefined4 *puVar4;
code *pcVar5;
int *piVar6;
uint uVar7;
int *piVar8;
int iVar9;
CDmxAttribute *this_00;
int iVar10;
undefined4 uVar11;
DmxElementUnpackStructure_t *pDVar12;
uint uVar13;
uint uVar14;
int iVar15;
char *pcVar16;
undefined8 uVar17;
int local_38;
CParticleOperatorInstance *local_20 [4];
piVar6 = (int *)CDmxElement::GetAttribute(param_4,param_1);
if ((piVar6 != (int *)0x0) && (*piVar6 == 0xf)) {
piVar1 = (int *)piVar6[2];
iVar2 = piVar1[3];
piVar6 = (int *)(g_pParticleSystemMgr + param_3 * 0x14);
if (0 < iVar2) {
local_38 = 0;
uVar7 = 1 << ((byte)param_3 & 0x1f);
do {
pcVar16 = "";
piVar8 = (int *)CDmxElement::GetAttribute
(*(CDmxElement **)(*piVar1 + local_38 * 4),"functionName");
if ((piVar8 != (int *)0x0) && (*piVar8 == 5)) {
pcVar16 = CUtlString::operator_cast_to_char_((CUtlString *)piVar8[2]);
}
iVar15 = 0;
do {
iVar9 = _V_stricmp(pcVar16,(&s_RemapOperatorNameTable)[iVar15]);
if (iVar9 == 0) {
pcVar3 = (&PTR_s_Alpha_Fade_and_Decay_00d55784)[iVar15];
if (pcVar16 != pcVar3) {
CDmxElement::LockForChanges(param_4,true);
/* try { // try from 00bcf7a7 to 00bcf7b7 has its CatchHandler @ 00bcf9f2 */
this_00 = (CDmxAttribute *)CDmxElement::AddAttribute(param_4,"functionName");
CDmxAttribute::SetValue(this_00,pcVar3);
if (param_4 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(param_4,false);
}
}
iVar15 = piVar6[3];
goto joined_r0x00bcf9aa;
}
iVar15 = iVar15 + 2;
} while (iVar15 != 0x6a);
iVar15 = piVar6[3];
pcVar3 = pcVar16;
joined_r0x00bcf9aa:
if (0 < iVar15) {
iVar9 = 0;
do {
puVar4 = *(undefined4 **)(*piVar6 + iVar9 * 4);
pcVar16 = (char *)(**(code **)*puVar4)(puVar4);
iVar10 = _V_stricmp(pcVar3,pcVar16);
if (iVar10 == 0) {
piVar8 = *(int **)(*piVar6 + iVar9 * 4);
pcVar5 = *(code **)(*piVar8 + 4);
uVar11 = CDmxElement::GetId(*(CDmxElement **)(*piVar1 + local_38 * 4));
local_20[0] = (CParticleOperatorInstance *)(*pcVar5)(piVar8,uVar11);
piVar8 = *(int **)(*piVar6 + iVar9 * 4);
pDVar12 = (DmxElementUnpackStructure_t *)(**(code **)(*piVar8 + 8))(piVar8);
if (pDVar12 != (DmxElementUnpackStructure_t *)0x0) {
CDmxElement::UnpackIntoStructure
(*(CDmxElement **)(*piVar1 + local_38 * 4),local_20[0],pDVar12);
}
(*(code *)**(undefined4 **)local_20[0])(local_20[0],this,param_4);
CParticleOperatorInstance::CheckForFastPath(local_20[0]);
uVar13 = (**(code **)(*(int *)local_20[0] + 0x10))(local_20[0]);
*(uint *)(this + 0x14) = *(uint *)(this + 0x14) | uVar13;
uVar17 = (**(code **)(*(int *)local_20[0] + 0x14))(local_20[0]);
*(uint *)(this + 0x18) = *(uint *)(this + 0x18) | (uint)uVar17;
*(uint *)(this + 0x1c) = *(uint *)(this + 0x1c) | (uint)((ulonglong)uVar17 >> 0x20);
uVar17 = (**(code **)(*(int *)local_20[0] + 0x1c))(local_20[0]);
*(uint *)(this + 0x20) = *(uint *)(this + 0x20) | (uint)uVar17;
*(uint *)(this + 0x24) = *(uint *)(this + 0x24) | (uint)((ulonglong)uVar17 >> 0x20);
if (param_3 < 7) {
if (((uVar7 & 0x62) == 0) && ((uVar7 & 1) == 0)) {
if ((uVar7 & 0xc) != 0) {
uVar13 = (**(code **)(*(int *)local_20[0] + 0xc))(local_20[0]);
*(uint *)(this + 0xc) = *(uint *)(this + 0xc) | uVar13;
}
}
else {
uVar13 = (**(code **)(*(int *)local_20[0] + 0xc))(local_20[0]);
*(uint *)(this + 8) = *(uint *)(this + 8) | uVar13;
uVar13 = (**(code **)(*(int *)local_20[0] + 0x20))(local_20[0]);
*(uint *)(this + 0x10) = *(uint *)(this + 0x10) | uVar13;
}
}
uVar13 = (**(code **)(*(int *)local_20[0] + 0x10))(local_20[0]);
uVar14 = (**(code **)(*(int *)local_20[0] + 0x20))(local_20[0]);
if (((uVar14 | uVar13) & 0x800) != 0) {
*(uint *)(this + 0x10) = *(uint *)(this + 0x10) | 0x800;
*(uint *)(this + 0xc) = *(uint *)(this + 0xc) | 0x800;
}
CUtlVector<CParticleOperatorInstance*,CUtlMemory<CParticleOperatorInstance*,int>>::
InsertBefore(param_5,*(int *)(param_5 + 0xc),local_20);
goto LAB_00bcf94c;
}
iVar9 = iVar9 + 1;
} while (iVar9 != iVar15);
iVar15 = piVar6[3];
}
if (iVar15 != 0) {
Warning("Didn\'t find particle function %s\n",pcVar3);
}
LAB_00bcf94c:
local_38 = local_38 + 1;
if (local_38 == iVar2) {
return;
}
} while( true );
}
}
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.