//
// cocos2d::CCSprite::addChild from 0x18008b3f0 to 0x18008b4c6 (214 bytes)
//
// 9 xrefs:
// > ??> @ 0x1800eba30
// > ??> @ 0x1800ebf08
// > ??> @ 0x1800eca88
// > ??> @ 0x180103940
// > ??> @ 0x180106938
// > ??> @ 0x18013d3ec
// > ??> @ 0x18013d3fc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b5af0
//
// 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::CCSprite::addChild(
cocos2d::CCSprite *this,
struct cocos2d::CCNode *a2,
unsigned int a3,
int a4)
{
struct cocos2d::CCSprite *v8; // rbx
__int64 v9; // rax
__int64 v10; // rax
if ( this->m_pobBatchNode )
{
v8 = (struct cocos2d::CCSprite *)_RTDynamicCast(
a2,
0,
&cocos2d::CCNode `RTTI Type Descriptor',
&cocos2d::CCSprite `RTTI Type Descriptor',
0);
v9 = ((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *))v8->getTexture)(&v8->cocos2d::CCTextureProtocol);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 96LL))(v9);
v10 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getTexture)(this->m_pobTextureAtlas);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 96LL))(v10);
cocos2d::CCSpriteBatchNode::appendChild(this->m_pobBatchNode, v8);
if ( !this->m_bReorderChildDirty )
((void (__fastcall *)(cocos2d::CCSprite *))this->setReorderChildDirtyRecursively)(this);
}
cocos2d::CCNode::addChild(this, a2, a3, a4);
this->m_bHasChildren = 1;
}