//
// FLAlertLayer::init_1 from 0x140051ac0 to 0x140051bc7 (263 bytes)
//
// 55 xrefs:
// > AccountRegisterLayer::init @ 0x140078ad0
// > AudioAssetsBrowser::init @ 0x1400837d1
// > ChallengesPage::init @ 0x1400853b1
// > CharacterColorPage::init @ 0x140087fdb
// > CollisionBlockPopup::init @ 0x14008aa84
// > ColorSelectLiveOverlay::init @ 0x14008bea3
// > CommunityCreditsPage::init @ 0x14009412b
// > HSVWidgetPopup::init @ 0x140096633
// > ConfigureValuePopup::init @ 0x1400986ab
// > CreateGuidelinesLayer::init @ 0x140099895
// > CustomizeObjectLayer::init @ 0x1400a5495
// > SongOptionsLayer::init @ 0x1400c45e9
// > NewgroundsInfoLayer::init @ 0x1400c5687
// > NCSInfoLayer::init @ 0x1400c6428
// > FollowRewardPage::init @ 0x140139d96
// > FRequestProfilePage::init @ 0x14013dac2
// > FriendsProfilePage::init @ 0x14013fdcf
// > GJColorSetupLayer::init @ 0x1402560d2
// > ItemInfoPopup::init @ 0x14027b8fe
// > TOSPopup::init @ 0x14029dfc3
// > GJSpecialColorSelect::init @ 0x1402b7e8a
// > HSVLiveOverlay::init @ 0x1402b99eb
// > InfoLayer::init @ 0x1402bab03
// > KeybindingsLayer::init @ 0x1402bf99e
// > LevelLeaderboard::init @ 0x140300b82
// > DemonFilterSelectLayer::init @ 0x140317996
// > LevelSettingsLayer::init @ 0x14031eaac
// > LikeItemLayer::init @ 0x14032de84
// > MessagesProfilePage::init @ 0x140336757
// > MusicBrowser::init @ 0x1403388f4
// > OptionsScrollLayer::create @ 0x14033ac50
// > NumberInputLayer::init @ 0x140348459
// > ParentalOptionsLayer::init @ 0x14037b59e
// > ProfilePage::init @ 0x1403be88a
// > DemonInfoPopup::init @ 0x1403c7276
// > StarInfoPopup::init @ 0x1403c8250
// > RateDemonLayer::init @ 0x1403c8b7d
// > RateLevelLayer::init @ 0x1403c97ad
// > RateStarsLayer::init @ 0x1403ca1a7
// > RewardUnlockLayer::init @ 0x1403cde70
// > SetupObjectOptionsPopup::init @ 0x1403fdf72
// > SelectPremadeLayer::init @ 0x140406c10
// > CreateParticlePopup::init @ 0x14042c1a2
// > SetupSmartBlockLayer::init @ 0x140456a53
// > SetupSmartTemplateLayer::init @ 0x140458be1
// > BrowseSmartTemplateLayer::init @ 0x140459e15
// > BrowseSmartKeyLayer::init @ 0x14045b4cf
// > SetupTriggerPopup::init @ 0x140473cc5
// > SFXBrowser::init @ 0x14047e6e0
// > ShardsPage::init @ 0x140489b7e
// > ShareCommentLayer::init @ 0x14048d0bf
// > ShareLevelSettingsLayer::init @ 0x14049111c
// > SongInfoLayer::init @ 0x1404929ec
// > TopArtistsLayer::init @ 0x1404cac54
// > ??> @ 0x1406c4e18
//
// 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=1
bool FLAlertLayer::init_1(FLAlertLayer *a1, int a2)
{
bool result; // al
GameManager *v4; // rcx
_BOOL8 v5; // rdx
__int64 v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
_BOOL8 v8; // rdx
cocos2d::CCLayer *v9; // rax
struct cocos2d::_ccColor4B v10; // [rsp+38h] [rbp+10h] BYREF
void *v11; // [rsp+40h] [rbp+18h]
*(_WORD *)&v10.r = 0;
v10.b = 0;
v10.a = a2;
result = cocos2d::CCLayerColor::initWithColor(a1, &v10);
if ( result )
{
v4 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v11 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v4 = (GameManager *)qword_1406C2ED8;
}
if ( GameManager::getGameVariable(v4, "0168") )
a1->m_noElasticity = 1;
if ( !a1->m_forcePrioRegistered )
{
a1->m_forcePrioRegistered = 1;
v6 = cocos2d::CCDirector::sharedDirector();
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::registerForcePrio(v7, a1, 2);
}
LOBYTE(v5) = 1;
a1->setTouchEnabled(a1, v5);
LOBYTE(v8) = 1;
a1->setKeypadEnabled(a1, v8);
v9 = (cocos2d::CCLayer *)cocos2d::CCLayer::create();
a1->m_mainLayer = v9;
a1->addChild_1(a1, v9);
a1->m_joystickConnected = -1;
return 1;
}
return result;
}