//
// NotificationFilterPopup::init from 0xc5fed0 to 0xc60718 (2120 bytes)
//
// 2 xrefs:
// > NotificationFilterPopup::create @ 0xc60974
// > ??> @ 0x60898
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:05:21 +0000
//
__int64 __fastcall NotificationFilterPopup::init(cocos2d::CCNode **this, NotificationsPage *a2)
{
GameLevelManager *v4; // x0
unsigned int v5; // w23
GameLevelManager *v7; // x0
cocos2d::CCDirector *v8; // x0
cocos2d::CCDirector *v9; // x0
float v10; // s8
float v11; // s9
const char *v12; // x1
__int64 v13; // x22
__int64 v14; // x22
char v15; // w22
__int64 v16; // x27
cocos2d::CCNode *v17; // x28
void (__fastcall *v18)(__int64, __int64 *); // x26
float v19; // s10
float v20; // s9
float v21; // s8
const char *v22; // x2
__int64 v23; // x25
void (__fastcall *v24)(__int64, __int64 *); // x27
const char *v25; // x2
__int64 v26; // x27
void (__fastcall *v27)(__int64, __int64 *); // x25
GameManager *v28; // x0
GameManager *v29; // x0
unsigned __int8 v30; // w22
cocos2d::CCNode *v31; // [xsp+90h] [xbp+90h]
void (__fastcall *v32)(__int64, __int64 *); // [xsp+98h] [xbp+98h]
__int64 v33; // [xsp+A0h] [xbp+A0h] BYREF
_BYTE v34[8]; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v35; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v36; // [xsp+B8h] [xbp+B8h] BYREF
size_t v37; // [xsp+C0h] [xbp+C0h]
void *v38; // [xsp+C8h] [xbp+C8h]
__int64 v39[2]; // [xsp+D0h] [xbp+D0h] BYREF
void *v40; // [xsp+E0h] [xbp+E0h]
__int64 v41; // [xsp+E8h] [xbp+E8h] BYREF
size_t v42; // [xsp+F0h] [xbp+F0h]
void *v43; // [xsp+F8h] [xbp+F8h]
__int64 v44[2]; // [xsp+100h] [xbp+100h] BYREF
void *v45; // [xsp+110h] [xbp+110h]
__int64 v46[2]; // [xsp+118h] [xbp+118h] BYREF
void *v47; // [xsp+128h] [xbp+128h]
__int64 v48[2]; // [xsp+130h] [xbp+130h] BYREF
void *v49; // [xsp+140h] [xbp+140h]
__int64 v50[2]; // [xsp+148h] [xbp+148h] BYREF
void *v51; // [xsp+158h] [xbp+158h]
__int64 v52[2]; // [xsp+160h] [xbp+160h] BYREF
void *v53; // [xsp+170h] [xbp+170h]
__int64 v54[2]; // [xsp+178h] [xbp+178h] BYREF
void *v55; // [xsp+188h] [xbp+188h]
__int64 v56; // [xsp+190h] [xbp+190h] BYREF
__int64 v57; // [xsp+198h] [xbp+198h]
void *v58; // [xsp+1A0h] [xbp+1A0h]
v4 = (GameLevelManager *)(unsigned __int8)SetupTriggerPopup::init(
(SetupTriggerPopup *)this,
nullptr,
nullptr,
360.0,
240.0,
1u,
0.0);
v5 = (unsigned __int8)v4;
if ( (_BYTE)v4 )
{
*(this + 127) = a2;
v7 = (GameLevelManager *)GameLevelManager::sharedState(v4);
v8 = (cocos2d::CCDirector *)GameLevelManager::notificationMask(v7);
*((_DWORD *)this + 256) = (_DWORD)v8;
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
cocos2d::CCDirector::getWinSize(&v33, v9);
v56 = 0;
v57 = 0;
v10 = (float)(*((float *)&v33 + 1) * 0.5) + 120.0;
v58 = nullptr;
v11 = *(float *)&v33 * 0.5;
std::string::__init(&v56, "Notifications", 0xDu);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v56);
if ( (v56 & 1) != 0 )
operator delete(v58);
v13 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v12);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v13 + 160LL))(v13, 0.8);
v14 = CCMenuItemSpriteExtra::create(v13, 0, (__int64)this, 1368, 1);
CCMenuItemSpriteExtra::setSizeMult(v14, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v14);
v32 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v14 + 184LL);
v31 = *(this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, (float)(v11 - 180.0) + 8.0, v10 - 12.0);
cocos2d::CCNode::convertToNodeSpace(&v35, v31, (const cocos2d::CCPoint *)v34);
v32(v14, &v35);
v15 = NotificationFilterPopup::savedMask((NotificationFilterPopup *)this);
v36 = 0;
v37 = 0;
v38 = nullptr;
std::string::__init(
&v36,
"Public: what friends and creators you follow do.\n"
"Personal: milestones for your own levels and profile.\n"
"Public Alerts: show the red indicator on your profile button for new Public notifications too.",
0xDDu);
v39[0] = 0;
v39[1] = 0;
v40 = nullptr;
std::string::__init(v39, "Notifications", 0xDu);
v41 = 0;
v42 = 0;
v43 = nullptr;
if ( (v36 & 1) != 0 )
{
std::string::__init(&v41, v38, v37);
}
else
{
v43 = v38;
v41 = v36;
v42 = v37;
}
v16 = InfoAlertButton::create((char *)v39, (char *)&v41, 0.7);
if ( (v41 & 1) != 0 )
operator delete(v43);
if ( (v39[0] & 1) != 0 )
operator delete(v40);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v16);
v17 = *(this + 69);
v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, (float)(v11 + 180.0) - 18.0, v10 - 18.0);
cocos2d::CCNode::convertToNodeSpace(&v35, v17, (const cocos2d::CCPoint *)v34);
v18(v16, &v35);
v19 = v11 - 140.0;
v20 = v11 + 25.0;
v21 = v10 - 80.0;
v23 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Public", "goldFont.fnt", v22);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 160LL))(v23, 0.6);
v24 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v23 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v19 + 57.0, v21 + 28.0);
v24(v23, &v35);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 73) + 456LL))(*(this + 73), v23);
v26 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Personal", "goldFont.fnt", v25);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL))(v26, 0.6);
v27 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v20 + 50.0, v21 + 28.0);
v27(v26, &v35);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 73) + 456LL))(*(this + 73), v26);
v44[0] = 0;
v44[1] = 0;
v45 = nullptr;
std::string::__init(v44, "Friend Uploads", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v19, v21);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)v44,
(const char *)NotificationFilterPopup::onFriendUploads,
0,
v15 & 1,
(cocos2d::CCPoint *)&v35);
if ( (v44[0] & 1) != 0 )
operator delete(v45);
v46[0] = 0;
v46[1] = 0;
v47 = nullptr;
std::string::__init(v46, "Followed Uploads", 0x10u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v19, v21 - 36.0);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)v46,
(const char *)NotificationFilterPopup::onFollowUploads,
0,
(v15 & 2) != 0,
(cocos2d::CCPoint *)&v35);
if ( (v46[0] & 1) != 0 )
operator delete(v47);
v48[0] = 0;
v48[1] = 0;
v49 = nullptr;
std::string::__init(v48, "Downloads", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v20, v21);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)v48,
(const char *)NotificationFilterPopup::onDownloadMilestones,
0,
(v15 & 4) != 0,
(cocos2d::CCPoint *)&v35);
if ( (v48[0] & 1) != 0 )
operator delete(v49);
v50[0] = 0;
v50[1] = 0;
v51 = nullptr;
std::string::__init(v50, "Followers", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v20, v21 - 36.0);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)v50,
(const char *)NotificationFilterPopup::onFollowerMilestones,
0,
(v15 & 0x10) != 0,
(cocos2d::CCPoint *)&v35);
if ( (v50[0] & 1) != 0 )
operator delete(v51);
v52[0] = 0;
v52[1] = 0;
v53 = nullptr;
std::string::__init(v52, "Friend Rates", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v19, v21 - 72.0);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)v52,
(const char *)NotificationFilterPopup::onFriendRated,
0,
(v15 & 0x40) != 0,
(cocos2d::CCPoint *)&v35);
if ( (v52[0] & 1) != 0 )
operator delete(v53);
v54[0] = 0;
v54[1] = 0;
v55 = nullptr;
std::string::__init(v54, "Friend Accepts", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v20, v21 - 72.0);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)v54,
(const char *)NotificationFilterPopup::onFriendAccepts,
0,
(v15 & 0x20) != 0,
(cocos2d::CCPoint *)&v35);
if ( (v54[0] & 1) != 0 )
operator delete(v55);
v56 = 0;
v57 = 0;
v58 = nullptr;
v28 = (GameManager *)std::string::__init(&v56, "Public Alerts", 0xDu);
v29 = (GameManager *)GameManager::sharedState(v28);
v30 = GameManager::getGameVariable(v29, "0240") ^ 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35, v19, v21 - 108.0);
SetupTriggerPopup::createToggleButton(
(__int64)this,
(char *)&v56,
(const char *)NotificationFilterPopup::onSocialAlerts,
0,
v30,
(cocos2d::CCPoint *)&v35);
if ( (v56 & 1) != 0 )
operator delete(v58);
if ( (v36 & 1) != 0 )
operator delete(v38);
}
return v5;
}