CParticleSystemDefinition::WriteOperators
0x00bcfa20 · 453 bytes · __thiscall
_ZN25CParticleSystemDefinition14WriteOperatorsEP11CDmxElementPKcRK10CUtlVectorIP25CParticleOperatorInstance10CUtlMemoryIS6_iEE
Decompiled
undefined (4 params)
/* CParticleSystemDefinition::WriteOperators(CDmxElement*, char const*,
CUtlVector<CParticleOperatorInstance*, CUtlMemory<CParticleOperatorInstance*, int> > const&) */
void __thiscall
CParticleSystemDefinition::WriteOperators
(CParticleSystemDefinition *this,CDmxElement *param_1,char *param_2,CUtlVector *param_3)
{
undefined4 *puVar1;
int iVar2;
int *piVar3;
CDmxElement *pCVar4;
CDmxAttribute *pCVar5;
CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> *this_00;
char *pcVar6;
DmxElementUnpackStructure_t *pDVar7;
int iVar8;
CDmxElement *local_20 [4];
CDmxElement::LockForChanges(param_1,true);
/* try { // try from 00bcfa49 to 00bcfb09 has its CatchHandler @ 00bcfbe5 */
pCVar5 = (CDmxAttribute *)CDmxElement::AddAttribute(param_1,param_2);
if (*(int *)pCVar5 != 0xf) {
CDmxAttribute::AllocateDataMemory(pCVar5,0xf);
puVar1 = *(undefined4 **)(pCVar5 + 8);
this_00 = (CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> *)0x0;
if (puVar1 == (undefined4 *)0x0) goto LAB_00bcfa91;
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
puVar1[3] = 0;
puVar1[4] = 0;
}
this_00 = *(CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> **)(pCVar5 + 8);
LAB_00bcfa91:
iVar2 = *(int *)(param_3 + 0xc);
if (0 < iVar2) {
iVar8 = 0;
do {
local_20[0] = (CDmxElement *)CreateDmxElement("DmeParticleOperator");
CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>>::InsertBefore
(this_00,*(int *)(this_00 + 0xc),local_20);
piVar3 = *(int **)(*(int *)(*(int *)param_3 + iVar8 * 4) + 0x40);
pcVar6 = (char *)(**(code **)*piVar3)(piVar3);
pCVar4 = local_20[0];
CDmxElement::LockForChanges(local_20[0],true);
/* try { // try from 00bcfb15 to 00bcfb28 has its CatchHandler @ 00bcfc21 */
pCVar5 = (CDmxAttribute *)CDmxElement::AddAttribute(pCVar4,"name");
CDmxAttribute::SetValue(pCVar5,pcVar6);
if (pCVar4 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(pCVar4,false);
}
/* try { // try from 00bcfb42 to 00bcfb59 has its CatchHandler @ 00bcfbe5 */
pcVar6 = (char *)(**(code **)*piVar3)(piVar3);
pCVar4 = local_20[0];
CDmxElement::LockForChanges(local_20[0],true);
/* try { // try from 00bcfb65 to 00bcfb78 has its CatchHandler @ 00bcfc09 */
pCVar5 = (CDmxAttribute *)CDmxElement::AddAttribute(pCVar4,"functionName");
CDmxAttribute::SetValue(pCVar5,pcVar6);
if (pCVar4 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(pCVar4,false);
}
/* try { // try from 00bcfb92 to 00bcfbb6 has its CatchHandler @ 00bcfbe5 */
pDVar7 = (DmxElementUnpackStructure_t *)(**(code **)(*piVar3 + 8))(piVar3);
if (pDVar7 != (DmxElementUnpackStructure_t *)0x0) {
CDmxElement::AddAttributesFromStructure
(local_20[0],*(void **)(*(int *)param_3 + iVar8 * 4),pDVar7);
}
iVar8 = iVar8 + 1;
} while (iVar8 != iVar2);
}
if (param_1 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(param_1,false);
}
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.