//
// cocos2d::CCParticleBatchNode::addChild from 0x1800610c0 to 0x18006120a (330 bytes)
//
// 5 xrefs:
// > ??> @ 0x1800fa240
// > ??> @ 0x1801398f0
// > ??> @ 0x180139924
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b35c4
//
// 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::CCParticleBatchNode::addChild(
cocos2d::CCParticleBatchNode *this,
struct cocos2d::CCParticleSystem *a2,
int a3,
int a4)
{
unsigned int v8; // ebp
struct cocos2d::CCNode *v9; // r14
__int64 v10; // rax
__int64 v11; // rax
cocos2d::CCTextureProtocol_vtbl *v12; // rdi
_QWORD *v13; // rax
unsigned int v14; // eax
struct cocos2d::CCString *v15; // rbx
char v16; // [rsp+70h] [rbp+8h] BYREF
char v17; // [rsp+78h] [rbp+10h] BYREF
v8 = 0;
_RTDynamicCast(a2, 0, &cocos2d::CCNode `RTTI Type Descriptor', &cocos2d::CCParticleSystem `RTTI Type Descriptor', 0);
v9 = (struct cocos2d::CCNode *)&a2->cocos2d::CCTextureProtocol;
v10 = ((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *))a2->getTexture)(&a2->cocos2d::CCTextureProtocol);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 96LL))(v10);
v11 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTexture)(this->m_pTextureAtlas);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v11 + 96LL))(v11);
if ( !(unsigned int)cocos2d::CCArray::count(this->m_pChildren) )
{
v12 = this->cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable;
v13 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *, char *))v9->~CCNode)(
&a2->cocos2d::CCTextureProtocol,
&v16);
((void (__fastcall *)(cocos2d::CCTextureProtocol *, _QWORD))v12->setBlendFunc)(
&this->cocos2d::CCTextureProtocol,
*v13);
}
if ( this->m_tBlendFunc.src == *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *, char *))v9->~CCNode)(
&a2->cocos2d::CCTextureProtocol,
&v16) )
((void (__fastcall *)(cocos2d::CCTextureProtocol *, char *))v9->~CCNode)(&a2->cocos2d::CCTextureProtocol, &v17);
v14 = cocos2d::CCParticleBatchNode::addChildHelper(this, a2, a3, a4);
if ( v14 )
{
v15 = cocos2d::CCArray::stringAtIndex(this->m_pChildren, v14 - 1);
v8 = v15[5].m_uID + ((__int64 (__fastcall *)(struct cocos2d::CCString *))v15->__vftable[20].update)(v15);
}
cocos2d::CCParticleBatchNode::insertChild(this, a2, v8);
((void (__fastcall *)(struct cocos2d::CCParticleSystem *, cocos2d::CCParticleBatchNode *))a2->setBatchNode)(a2, this);
}