//
// ScrollableContentLayer::sectionAddChild from 0x3f5ce0 to 0x3f5d5c (124 bytes)
//
// 1 xrefs:
// > SectionedContentNode::addChild @ 0x3f5d72
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:47:17 +0000
//
int __fastcall ScrollableContentLayer::sectionAddChild(int this, cocos2d::CCNode *a2, int a3, int a4)
{
ScrollableContentLayer *v4; // r5
float v8; // r0
int v9; // r8
cocos2d::CCNode *SectionMenu; // r0
v4 = (ScrollableContentLayer *)this;
if ( a2 )
{
if ( *(float *)(this + 408) > 0.0 )
{
v8 = (*(float (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)a2 + 120))(a2);
v9 = ScrollableContentLayer::sectionIndexForY(v4, v8);
if ( _dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCMenuItem,
0) )
{
SectionMenu = (cocos2d::CCNode *)ScrollableContentLayer::getOrCreateSectionMenu(v4, v9);
}
else
{
SectionMenu = ScrollableContentLayer::getOrCreateSection(v4, v9);
}
return (*(int (__fastcall **)(cocos2d::CCNode *, cocos2d::CCNode *, int, int))(*(_DWORD *)SectionMenu + 236))(
SectionMenu,
a2,
a3,
a4);
}
else
{
this = *(_DWORD *)(this + 320);
if ( this )
return cocos2d::CCNode::addChild((cocos2d::CCNode *)this, a2, a3, a4);
}
}
return this;
}