//
// ParticleGameObject::applyParticleSettings from 0x4e77d0 to 0x4e7a2a (602 bytes)
//
// 2 xrefs:
// > ParticleGameObject::claimParticle @ 0x4e7b16
// > GJBaseGameLayer::spawnParticleTrigger @ 0x59c758
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:51:06 +0000
//
const cocos2d::CCPoint *__fastcall ParticleGameObject::applyParticleSettings(
ParticleGameObject *this,
cocos2d::CCParticleSystemQuad *a2)
{
_BOOL4 v4; // r0
int v5; // r3
void (__fastcall *v6)(cocos2d::CCParticleSystemQuad *, int); // r7
int v7; // r0
void (__fastcall *v8)(cocos2d::CCParticleSystemQuad *, int); // r7
int v9; // r0
int v10; // r3
int (__fastcall *v11)(cocos2d::CCParticleSystemQuad *, int); // r7
int v12; // r0
const cocos2d::CCPoint *result; // r0
float v14; // r0
int v15; // r0
__int16 v16; // r1
unsigned __int8 v17; // r2
int v18; // r0
unsigned __int8 *v19; // r0
int v20; // r9
int v21; // r8
float v22; // s19
int v23; // r7
int v24; // s18
void (__fastcall *v25)(cocos2d::CCParticleSystemQuad *, float *); // r10
int v26; // s17
void (__fastcall *v27)(cocos2d::CCParticleSystemQuad *, float *); // r10
int v28; // r0
__int16 v29; // r1
char v30; // r2
int v31; // r0
float *v32; // r0
float v33; // s12
int v34; // s14
int v35; // s10
float v36; // s13
int v37; // s11
int v38; // s9
__int16 v39; // [sp+0h] [bp-1Ch] BYREF
unsigned __int8 v40; // [sp+2h] [bp-1Ah]
float v41; // [sp+4h] [bp-18h] BYREF
float v42; // [sp+8h] [bp-14h]
float v43; // [sp+Ch] [bp-10h]
int v44; // [sp+10h] [bp-Ch]
v4 = (*(int (__fastcall **)(cocos2d::CCParticleSystemQuad *))(*(_DWORD *)a2 + 780))(a2) != 2;
*((_BYTE *)this + 688) = v4;
*((_BYTE *)this + 928) = v4;
v5 = *(_DWORD *)a2;
if ( v4 )
{
(*(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, int))(v5 + 80))(a2, 1065353216);
}
else
{
v6 = *(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, int))(v5 + 64);
v7 = (*(int (__fastcall **)(ParticleGameObject *))(*(_DWORD *)this + 68))(this);
v6(a2, v7);
v8 = *(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, int))(*(_DWORD *)a2 + 72);
v9 = (*(int (__fastcall **)(ParticleGameObject *))(*(_DWORD *)this + 76))(this);
v8(a2, v9);
}
v10 = *(_DWORD *)a2;
if ( *((_BYTE *)this + 928) )
{
(*(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, _DWORD))(v10 + 180))(a2, 0);
v14 = (*(float (__fastcall **)(ParticleGameObject *))(*(_DWORD *)this + 184))(this);
result = ParticleGameObject::updateParticleAngle(this, v14, a2);
}
else
{
v11 = *(int (__fastcall **)(cocos2d::CCParticleSystemQuad *, int))(v10 + 180);
v12 = (*(int (__fastcall **)(ParticleGameObject *))(*(_DWORD *)this + 184))(this);
result = (const cocos2d::CCPoint *)v11(a2, v12);
}
if ( *((_BYTE *)this + 677) )
{
v15 = (*(int (__fastcall **)(ParticleGameObject *))(*(_DWORD *)this + 472))(this);
v16 = *(_WORD *)v15;
v17 = *(_BYTE *)(v15 + 2);
v18 = *((_DWORD *)this + 189);
v39 = v16;
v40 = v17;
if ( v18 )
v19 = (unsigned __int8 *)(*(int (__fastcall **)(int))(*(_DWORD *)v18 + 472))(v18);
else
v19 = (unsigned __int8 *)&v39;
v20 = *v19;
v21 = v19[1];
v22 = (float)(unsigned __int8)v39;
v23 = v19[2];
v24 = HIBYTE(v39);
v25 = *(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, float *))(*(_DWORD *)a2 + 680);
v26 = v40;
v44 = *(_DWORD *)((*(int (__fastcall **)(cocos2d::CCParticleSystemQuad *))(*(_DWORD *)a2 + 676))(a2) + 12);
v41 = v22 / 255.0;
v42 = (float)v24 / 255.0;
v43 = (float)v26 / 255.0;
v25(a2, &v41);
v27 = *(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, float *))(*(_DWORD *)a2 + 696);
v44 = *(_DWORD *)((*(int (__fastcall **)(cocos2d::CCParticleSystemQuad *))(*(_DWORD *)a2 + 692))(a2) + 12);
v41 = (float)v20 / 255.0;
v42 = (float)v21 / 255.0;
v43 = (float)v23 / 255.0;
v27(a2, &v41);
}
else
{
if ( !*((_BYTE *)this + 1560) )
return result;
v28 = (*(int (__fastcall **)(ParticleGameObject *))(*(_DWORD *)this + 472))(this);
v29 = *(_WORD *)v28;
v30 = *(_BYTE *)(v28 + 2);
v31 = *((_DWORD *)this + 189);
LOWORD(v41) = v29;
BYTE2(v41) = v30;
if ( v31 )
v32 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v31 + 472))(v31);
else
v32 = &v41;
v33 = (float)*(unsigned __int8 *)v32;
v34 = *((unsigned __int8 *)v32 + 2);
v35 = BYTE1(v41);
v36 = (float)*((unsigned __int8 *)v32 + 1);
v37 = BYTE2(v41);
v38 = LOBYTE(v41);
*((_DWORD *)a2 + 159) = 1065353216;
*((_DWORD *)a2 + 163) = 1065353216;
*((float *)a2 + 157) = (float)v35 / 255.0;
*((float *)a2 + 158) = (float)v37 / 255.0;
*((float *)a2 + 156) = (float)v38 / 255.0;
*((float *)a2 + 160) = v33 / 255.0;
*((float *)a2 + 161) = v36 / 255.0;
*((float *)a2 + 162) = (float)v34 / 255.0;
}
return (const cocos2d::CCPoint *)(*(int (__fastcall **)(cocos2d::CCParticleSystemQuad *))(*(_DWORD *)a2 + 640))(a2);
}