//
// ScrollableContentLayer::sectionAddChild from 0x6e4ecc to 0x6e4f9c (208 bytes)
//
// 2 xrefs:
// > SectionedContentNode::addChild @ 0x6e4fa8
// > ??> @ 0x102850
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:51:42 +0000
//
__int64 __fastcall ScrollableContentLayer::sectionAddChild(
__int64 this,
cocos2d::CCNode *a2,
unsigned int a3,
unsigned int a4)
{
ScrollableContentLayer *v5; // x20
float v8; // s0
unsigned int v9; // w23
void *SectionMenu; // x0
if ( a2 )
{
if ( *(float *)(this + 520) <= 0.0 )
{
this = *(_QWORD *)(this + 416);
if ( this )
return cocos2d::CCNode::addChild((cocos2d::CCNode *)this, a2, a3, a4);
}
else
{
v5 = (ScrollableContentLayer *)this;
v8 = (*(float (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a2 + 240LL))(a2);
v9 = ScrollableContentLayer::sectionIndexForY(v5, 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 = ScrollableContentLayer::getOrCreateSectionMenu(v5, v9);
}
else
{
SectionMenu = ScrollableContentLayer::getOrCreateSection(v5, v9);
}
return (*(__int64 (__fastcall **)(void *, cocos2d::CCNode *, _QWORD, _QWORD))(*(_QWORD *)SectionMenu + 472LL))(
SectionMenu,
a2,
a3,
a4);
}
}
return this;
}