//
// cocos2d::CCScrollLayer::initWithLayers from 0x578de4 to 0x578f1c (312 bytes)
//
// 2 xrefs:
// > cocos2d::CCScrollLayer::nodeWithLayers @ 0x578ff4
// > ??> @ 0xb5818
//
// 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
//
bool __fastcall cocos2d::CCScrollLayer::initWithLayers(cocos2d::CCLayer *this, cocos2d::CCArray *a2, int a3)
{
bool v6; // w0
_BOOL4 v7; // w23
cocos2d::CCDirector *v9; // x0
unsigned int v10; // w19
cocos2d::CCTouchDispatcher *v11; // x0
cocos2d::CCDirector *v12; // x0
cocos2d::CCDirector *v13; // x0
unsigned int v14; // w1
__int64 v15; // x0
float v16; // [xsp+50h] [xbp+50h]
float v17; // [xsp+54h] [xbp+54h]
v6 = cocos2d::CCLayer::init(this);
v7 = v6;
if ( v6 )
{
v9 = cocos2d::CCDirector::sharedDirector();
v10 = 0;
v11 = v9->getTouchDispatcher(v9);
cocos2d::CCTouchDispatcher::addTargetedDelegate(v11, &this->cocos2d::CCTouchDelegate, 0, 1);
*(&this->m_uPreviousPriority + 1) = (unsigned int)&dword_0 + 1;
v12 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v12);
*((float *)this + 103) = (float)((int)v16 - a3);
v13 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v13);
*((_DWORD *)this + 105) = *((_DWORD *)this + 103);
*((float *)this + 104) = (float)(int)v17;
*((float *)this + 106) = (float)(int)v17;
while ( v10 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v14 = v10++;
v15 = cocos2d::CCArray::objectAtIndex(a2, v14);
this->addChild(this, (cocos2d::CCNode *)v15);
}
*((_DWORD *)this + 102) = cocos2d::CCArray::count(a2);
}
return v7;
}