//
// cocos2d::CCSprite::addChild from 0xb16608 to 0xb166e4 (220 bytes)
//
// 80 xrefs:
// > ??> @ 0xc6720
// > ??> @ 0x11360b8
// > ??> @ 0x1136668
// > ??> @ 0x11373e8
// > ??> @ 0x1139538
// > ??> @ 0x1139ac8
// > ??> @ 0x113cd48
// > ??> @ 0x113d368
// > ??> @ 0x113e798
// > ??> @ 0x1142cc8
// > ??> @ 0x1143268
// > ??> @ 0x1144bb8
// > ??> @ 0x1145158
// > ??> @ 0x1149598
// > ??> @ 0x11528a8
// > ??> @ 0x1153098
// > ??> @ 0x1153678
// > ??> @ 0x1153e48
// > ??> @ 0x1154648
// > ??> @ 0x11598e8
// > ??> @ 0x1161ff8
// > ??> @ 0x11627f8
// > ??> @ 0x1162ff8
// > ??> @ 0x11637f8
// > ??> @ 0x1163ff8
// > ??> @ 0x11647f8
// > ??> @ 0x1164ff8
// > ??> @ 0x11657f8
// > ??> @ 0x1165fc8
// > ??> @ 0x11667c8
// > ??> @ 0x1166fc8
// > ??> @ 0x11677c8
// > ??> @ 0x1167fc8
// > ??> @ 0x1168808
// > ??> @ 0x1169008
// > ??> @ 0x1169808
// > ??> @ 0x116a008
// > ??> @ 0x116a808
// > ??> @ 0x116b018
// > ??> @ 0x116b818
// > ??> @ 0x116c018
// > ??> @ 0x116c818
// > ??> @ 0x116d018
// > ??> @ 0x116d818
// > ??> @ 0x116e018
// > ??> @ 0x116e818
// > ??> @ 0x116f018
// > ??> @ 0x116f818
// > ??> @ 0x1170018
// > ??> @ 0x1170818
// > ??> @ 0x1171018
// > ??> @ 0x1171818
// > ??> @ 0x1172018
// > ??> @ 0x1172818
// > ??> @ 0x1173018
// > ??> @ 0x1173818
// > ??> @ 0x1174018
// > ??> @ 0x1174818
// > ??> @ 0x1175018
// > ??> @ 0x1175818
// > ??> @ 0x1176018
// > ??> @ 0x1176818
// > ??> @ 0x1177038
// > ??> @ 0x1178e88
// > ??> @ 0x1179418
// > ??> @ 0x11924a8
// > ??> @ 0x1194198
// > ??> @ 0x11a0d68
// > ??> @ 0x11a1308
// > ??> @ 0x11aa888
// > ??> @ 0x11b0248
// > ??> @ 0x11b2548
// > ??> @ 0x11d9ca8
// > ??> @ 0x11ed558
// > ??> @ 0x11f72a8
// > ??> @ 0x1202048
// > ??> @ 0x12025d8
// > ??> @ 0x1203138
// > ??> @ 0x12186e8
// > ??> @ 0x1219d18
//
// 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 cocos2d::CCSprite::addChild(cocos2d::CCSprite *a1, cocos2d::CCNode *a2)
{
int v2; // w2
__int64 v4; // x0
cocos2d::CCTexture2D *v5; // x0
cocos2d::CCSprite *v6; // [xsp+38h] [xbp+38h]
if ( !a1->m_pobBatchNode )
goto LABEL_5;
if ( a2 )
{
v6 = (cocos2d::CCSprite *)_dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCSprite,
0);
v4 = ((__int64 (*)(void))v6->getTexture)();
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 104LL))(v4);
v5 = a1->m_pobTextureAtlas->getTexture(a1->m_pobTextureAtlas);
v5->getName(v5);
cocos2d::CCSpriteBatchNode::appendChild(a1->m_pobBatchNode, v6);
if ( !a1->m_bReorderChildDirty )
a1->setReorderChildDirtyRecursively(a1);
LABEL_5:
cocos2d::CCNode::addChild(a1);
a1->m_bHasChildren = 1;
return;
}
__break(0x3E8u);
cocos2d::CCSprite::reorderChild((cocos2d::CCSprite *)0x10102464C457FLL, nullptr, v2);
}