//
// OptionsScrollLayer::init from 0x100610470 to 0x1006105df (367 bytes)
//
// 1 xrefs:
// > OptionsScrollLayer::create @ 0x10060feab
//
// 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 OptionsScrollLayer::init(OptionsScrollLayer *a1, cocos2d::CCArray *a2, bool a3, int a4)
{
bool result; // al
cocos2d::CCMenu *v7; // rax
cocos2d::CCSprite *v8; // rax
CCMenuItemSpriteExtra *v9; // r14
cocos2d::CCMenu *m_buttonMenu; // r15
char v11; // [rsp+Ch] [rbp-44h] BYREF
float v12[2]; // [rsp+14h] [rbp-3Ch] BYREF
float v13[2]; // [rsp+1Ch] [rbp-34h] BYREF
bool v14; // [rsp+27h] [rbp-29h]
double v15; // 0:xmm0_8.8
double v16; // 0:xmm0_8.8
result = FLAlertLayer::init_1(a1, 150);
if ( result )
{
v14 = result;
a1->m_noElasticity = 1;
a1->m_recreateList = a3;
a1->m_minCount = a4;
if ( a2 )
{
a1->m_optionObjects = a2;
cocos2d::CCObject::retain(a2);
}
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v15 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v13);
v7 = cocos2d::CCMenu::create();
a1->m_buttonMenu = v7;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64, double))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v7,
10,
v15);
a1->m_joystickConnected = -1;
v8 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v9 = CCMenuItemSpriteExtra::create(
v8,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)OptionsScrollLayer::onClose);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v9);
CCMenuItemSpriteExtra::setSizeMult(v9, 1.6);
m_buttonMenu = a1->m_buttonMenu;
sub_10028CBE0(v12, (float)((float)(v13[0] * 0.5) + -220.0) + 10.0, (float)((float)(0.5 * v13[1]) + 145.0) + -10.0);
*(cocos2d::CCPoint *)&v16 = cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)&v11,
(const cocos2d::CCPoint *)m_buttonMenu);
((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v9->setPosition)(v9, &v11, v16);
OptionsScrollLayer::setupList(a1, a1->m_optionObjects);
return v14;
}
return result;
}