//
// FLAlertLayer::init_1 from 0x10049bea0 to 0x10049bf6b (203 bytes)
//
// 60 xrefs:
// > CustomizeObjectLayer::init @ 0x1001f5112
// > GJColorSetupLayer::init @ 0x10020b57c
// > SongOptionsLayer::init @ 0x10021668f
// > NewgroundsInfoLayer::init @ 0x100217599
// > NCSInfoLayer::init @ 0x1002180ec
// > RewardUnlockLayer::init @ 0x10021bedf
// > MessagesProfilePage::init @ 0x10022da4c
// > SetupTriggerPopup::init @ 0x100234ebc
// > HSVLiveOverlay::init @ 0x10026a96c
// > LevelSettingsLayer::init @ 0x10026b762
// > ShareLevelSettingsLayer::init @ 0x1002825cf
// > RateDemonLayer::init @ 0x100283bac
// > CollisionBlockPopup::init @ 0x100285d82
// > RateStarsLayer::init @ 0x10028b951
// > TOSPopup::init @ 0x1002afe89
// > PromoInterstitial::create @ 0x1002d44f8
// > PromoInterstitial::init @ 0x1002d4562
// > SelectPremadeLayer::init @ 0x100309f99
// > TopArtistsLayer::init @ 0x1003107c9
// > SetupObjectOptionsPopup::init @ 0x100318065
// > CommunityCreditsPage::init @ 0x10031ea6c
// > ItemInfoPopup::init @ 0x1003719b1
// > ChallengesPage::init @ 0x10039d0e9
// > WorldLevelPage::init @ 0x1003c5757
// > SetupGravityModPopup::init @ 0x1003d82d5
// > LevelLeaderboard::init @ 0x1003da0b5
// > FollowRewardPage::init @ 0x10041f8dc
// > HSVWidgetPopup::init @ 0x10042f646
// > SFXBrowser::init @ 0x10043e66c
// > CreateParticlePopup::init @ 0x10046e8c5
// > NumberInputLayer::init @ 0x100492439
// > AccountRegisterLayer::init @ 0x10049556c
// > ShardsPage::init @ 0x1004c5b4c
// > SetupSmartBlockLayer::init @ 0x1004e5dc2
// > SetupSmartTemplateLayer::init @ 0x1004e7b7f
// > BrowseSmartTemplateLayer::init @ 0x1004e8e6f
// > BrowseSmartKeyLayer::init @ 0x1004eac02
// > LevelFeatureLayer::init @ 0x100504d2c
// > CreateGuidelinesLayer::init @ 0x10050b3d2
// > RateLevelLayer::init @ 0x100567cbc
// > ColorSelectLiveOverlay::init @ 0x10056896f
// > SetupPortalPopup::init @ 0x10056f832
// > ShareCommentLayer::init @ 0x1005dfaaf
// > LikeItemLayer::init @ 0x1005f8d82
// > SongInfoLayer::init @ 0x100600a8c
// > KeybindingsLayer::init @ 0x100609ea9
// > MusicBrowser::init @ 0x10060dd7f
// > OptionsScrollLayer::init @ 0x100610492
// > ConfigureValuePopup::init @ 0x1006248e7
// > GJSpecialColorSelect::init @ 0x100626094
// > DemonFilterSelectLayer::init @ 0x10062f529
// > FriendsProfilePage::init @ 0x100657c1c
// > CharacterColorPage::init @ 0x10065cbb9
// > FRequestProfilePage::init @ 0x10078fdec
// > ParentalOptionsLayer::init @ 0x1007a3579
// > InfoLayer::init @ 0x1007ae3a5
// > AudioAssetsBrowser::init @ 0x1007b3eff
// > ProfilePage::init @ 0x1007b879e
// > DemonInfoPopup::init @ 0x1007c144f
// > StarInfoPopup::init @ 0x1007c1fd8
//
// 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 FLAlertLayer::init_1(FLAlertLayer *a1, int a2)
{
bool result; // al
bool v3; // r14
GameManager *v4; // rax
cocos2d::CCDirector *v5; // rax
cocos2d::CCTouchDispatcher *v6; // rax
cocos2d::CCLayer *v7; // rax
int v8; // [rsp+Ch] [rbp-14h] BYREF
v8 = a2 << 24;
result = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::ccColor4B *)&v8);
if ( result )
{
v3 = result;
v4 = GameManager::sharedState();
if ( GameManager::getGameVariable(v4, "0168") )
a1->m_noElasticity = 1;
if ( !a1->m_forcePrioRegistered )
{
a1->m_forcePrioRegistered = 1;
v5 = cocos2d::CCDirector::sharedDirector();
v6 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v5->getTouchDispatcher)(v5);
cocos2d::CCTouchDispatcher::registerForcePrio(v6, a1, 2);
}
((void (__fastcall *)(FLAlertLayer *, __int64))a1->setTouchEnabled)(a1, 1);
((void (__fastcall *)(FLAlertLayer *, __int64))a1->setKeypadEnabled)(a1, 1);
v7 = cocos2d::CCLayer::create();
a1->m_mainLayer = v7;
((void (__fastcall *)(FLAlertLayer *, cocos2d::CCLayer *))a1->addChild)(a1, v7);
a1->m_joystickConnected = -1;
return v3;
}
return result;
}