//
// GJBaseGameLayer::spawnParticleTrigger from 0x8679e4 to 0x867b9c (440 bytes)
//
// 2 xrefs:
// > EffectGameObject::triggerObject @ 0x76f89c
// > ??> @ 0x60f78
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJBaseGameLayer::spawnParticleTrigger(GJBaseGameLayer *a1, SpawnParticleGameObject *a2)
{
float m_rotation; // s8
int v5; // w0
float m_scale; // s9
float v7; // s8
float v8; // s9
const cocos2d::CCPoint *v9; // x0
int m_centerGroupID; // w1
GameObject *Object; // x0
GameObject *v12; // x23
float v13; // s0
float v14; // s1
float x; // s14
int v16; // w0
float y; // s13
int v18; // w0
int m_targetGroupID; // w24
cocos2d::CCPoint v20; // [xsp+98h] [xbp+98h] BYREF
cocos2d::CCPoint v21; // [xsp+A0h] [xbp+A0h] BYREF
m_rotation = a2->m_rotation;
v5 = rand();
m_scale = a2->m_scale;
v7 = m_rotation + (float)((float)((float)((float)((float)v5 * 4.6566e-10) * 2.0) + -1.0) * a2->m_rotationVariance);
v8 = m_scale + (float)((float)((float)((float)((float)rand() * 4.6566e-10) * 2.0) + -1.0) * a2->m_scaleVariance);
v9 = a2->getPosition(a2);
cocos2d::CCPoint::CCPoint(&v20, v9);
m_centerGroupID = a2->m_centerGroupID;
if ( m_centerGroupID > 0 )
{
Object = GJBaseGameLayer::tryGetObject(a1, m_centerGroupID);
v12 = Object;
if ( Object )
{
v13 = ((float (__fastcall *)(GameObject *))Object->getPosition)(Object);
cocos2d::CCPoint::operator=(&v20, v13, v14);
if ( a2->m_matchRotation )
v7 = v7 + v12->getRotation(v12);
}
}
x = a2->m_offset.x;
v16 = rand();
y = a2->m_offset.y;
v20.x = v20.x
+ (float)(x + (float)((float)((float)((float)((float)v16 * 4.6566e-10) * 2.0) + -1.0) * a2->m_offsetVariance.x));
v18 = rand();
m_targetGroupID = a2->m_targetGroupID;
v20.y = v20.y
+ (float)(y + (float)((float)((float)((float)((float)v18 * 4.6566e-10) * 2.0) + -1.0) * a2->m_offsetVariance.y));
cocos2d::CCPoint::CCPoint(&v21, &v20);
GJBaseGameLayer::spawnParticleTrigger(a1, m_targetGroupID, &v21, v7, v8);
}