//
// cocos2d::CCParticleSystem::setBatchNode from 0x1007cb650 to 0x1007cb713 (195 bytes)
//
// 2 xrefs:
// > cocos2d::CCParticleSystemQuad::setBatchNode @ 0x100603ad0
// > ??> @ 0x100996758
//
// 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 __fastcall cocos2d::CCParticleSystem::setBatchNode(
cocos2d::CCParticleSystem *a1,
cocos2d::CCParticleBatchNode *a2)
{
unsigned int m_uTotalParticles; // esi
cocos2d::tCCParticle *m_pParticles; // rcx
__int64 v4; // rdx
__int64 v5; // rax
__int64 v6; // rsi
_DWORD *p_deltaRadius; // rdi
__int64 v8; // rcx
__int64 v9; // rdx
__int64 v10; // rsi
if ( a1->m_pBatchNode != a2 )
{
a1->m_pBatchNode = a2;
if ( a2 )
{
m_uTotalParticles = a1->m_uTotalParticles;
if ( m_uTotalParticles )
{
m_pParticles = a1->m_pParticles;
v4 = m_uTotalParticles & 3;
if ( m_uTotalParticles >= 4 )
{
v6 = m_uTotalParticles & 0xFFFFFFFC;
p_deltaRadius = (_DWORD *)&m_pParticles[4].modeB.deltaRadius;
v5 = 0;
do
{
*(p_deltaRadius - 111) = v5;
*(p_deltaRadius - 74) = v5 + 1;
*(p_deltaRadius - 37) = v5 + 2;
*p_deltaRadius = v5 + 3;
v5 += 4;
p_deltaRadius += 148;
}
while ( v5 != v6 );
}
else
{
v5 = 0;
}
if ( v4 )
{
v8 = (__int64)&m_pParticles->modeA + 148 * v5;
v9 = 148 * v4;
v10 = 0;
do
{
*(_DWORD *)(v8 + v10) = v5;
LODWORD(v5) = v5 + 1;
v10 += 148;
}
while ( v9 != v10 );
}
}
}
}
}