//
// CCScrollLayerExt::CCScrollLayerExt from 0x140046ac0 to 0x140046f8c (1228 bytes)
//
// 2 xrefs:
// > BoomListView::init @ 0x14003c147
// > ??> @ 0x1406c4878
//
// 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
//
// Hidden C++ exception states: #wind=2
CCScrollLayerExt *CCScrollLayerExt::CCScrollLayerExt(CCScrollLayerExt *a1, cocos2d::CCRect *a2)
{
float width; // xmm6_4
CCContentLayer *v5; // rbx
CCContentLayer_vtbl *v6; // rbx
const cocos2d::CCPoint *v7; // rax
float v8; // xmm6_4
const cocos2d::CCSize *v9; // rax
cocos2d::CCLayerColor *v10; // rax
cocos2d::CCLayerColor_vtbl *v11; // rbx
float height; // xmm6_4
double v13; // xmm7_8
const struct cocos2d::CCSize *ContentSize; // rax
const cocos2d::CCPoint *v15; // rax
float v16; // xmm6_4
const cocos2d::CCSize *v17; // rax
cocos2d::CCLayerColor *v18; // rax
cocos2d::CCLayerColor_vtbl *v19; // rbx
const cocos2d::CCPoint *v20; // rax
cocos2d::CCPoint v22; // [rsp+88h] [rbp+10h] BYREF
CCContentLayer *v23; // [rsp+90h] [rbp+18h] BYREF
cocos2d::CCLayer::CCLayer(a1);
a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCScrollLayerExt_vtbl *)&CCScrollLayerExt::`vftable';
a1->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&CCScrollLayerExt::`vftable';
a1->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&CCScrollLayerExt::`vftable';
a1->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&CCScrollLayerExt::`vftable';
a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&CCScrollLayerExt::`vftable';
a1->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&CCScrollLayerExt::`vftable';
cocos2d::CCPoint::CCPoint(&a1->m_touchPosition);
cocos2d::CCPoint::CCPoint(&a1->m_touchStartPosition);
a1->m_cutContent = 1;
a1->m_disableMovement = 0;
cocos2d::CCLayer::setTouchEnabled(a1, 1);
*(_WORD *)&a1->m_disableHorizontal = 0;
cocos2d::CCNode::setContentSize(a1, &a2->size);
cocos2d::CCNode::setPosition(a1, &a2->origin);
*(_WORD *)&a1->m_vScrollbarVisible = 0;
a1->m_delegate = nullptr;
a1->m_peekLimitTop = 50.0;
a1->m_peekLimitBottom = 50.0;
*(_QWORD *)&a1->m_scrollLimitTop = 0;
a1->m_touch = nullptr;
cocos2d::CCPoint::operator=(&a1->m_touchPosition, &stru_1406C13A8);
cocos2d::CCPoint::operator=(&a1->m_touchStartPosition, &stru_1406C13A8);
*(_WORD *)&a1->m_touchDown = 0;
v22.x = 1.1801041e-38;
width = a2->size.width;
v5 = (CCContentLayer *)operator new(0x220u);
v23 = v5;
memset(v5, 0, sizeof(CCContentLayer));
cocos2d::CCLayerColor::CCLayerColor(v5);
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCContentLayer_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&CCContentLayer::`vftable';
v5->cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&CCContentLayer::`vftable';
if ( cocos2d::CCLayerColor::initWithColor(v5, (const struct cocos2d::_ccColor4B *)&v22, width, 0.0) )
{
cocos2d::CCObject::autorelease(v5);
}
else
{
((void (__fastcall *)(CCContentLayer *, __int64))v5->~CCContentLayer)(v5, 1);
v5 = nullptr;
}
a1->m_contentLayer = v5;
v6 = v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v22, 0.0, 0.0);
v6->setAnchorPoint(a1->m_contentLayer, v7);
cocos2d::CCNode::addChild(a1, a1->m_contentLayer);
a1->m_verticalScrollbar = nullptr;
v8 = a2->size.height * a2->size.height;
v9 = a1->m_contentLayer->getContentSize(a1->m_contentLayer);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v23, 4.0, v8 / v9->height);
v22.x = -0.00000016595803;
v10 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v22, *(float *)&v23, *((float *)&v23 + 1));
a1->m_verticalScrollbar = v10;
v11 = v10->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
height = cocos2d::CCNode::getContentSize(a1)->height;
v13 = *((float *)&v23 + 1);
ContentSize = cocos2d::CCNode::getContentSize(a1);
cocos2d::CCPoint::CCPoint(&v22, ContentSize->width - *(float *)&v23 * 0.5, height - v13 * 0.5);
v11->setPosition_0(a1->m_verticalScrollbar, v15);
a1->m_verticalScrollbar->setTouchEnabled(a1->m_verticalScrollbar, 0);
cocos2d::CCNode::addChild(a1, a1->m_verticalScrollbar);
a1->m_verticalScrollbar->setVisible(a1->m_verticalScrollbar, 0);
a1->m_horizontalScrollbar = nullptr;
v16 = a2->size.width;
v17 = a1->m_contentLayer->getContentSize(a1->m_contentLayer);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v23, (float)(v16 * v16) / v17->width, 4.0);
v22.x = -0.00000016595803;
v18 = cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v22, *(float *)&v23, *((float *)&v23 + 1));
a1->m_horizontalScrollbar = v18;
v19 = v18->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v22, *(float *)&v23 * 0.5, *((float *)&v23 + 1) * 0.5);
v19->setPosition_0(a1->m_horizontalScrollbar, v20);
a1->m_horizontalScrollbar->setTouchEnabled(a1->m_horizontalScrollbar, 0);
cocos2d::CCNode::addChild(a1, a1->m_horizontalScrollbar);
a1->m_horizontalScrollbar->setVisible(a1->m_horizontalScrollbar, 0);
cocos2d::CCNode::schedule(a1, CCScrollLayerExt::updateIndicators);
return a1;
}