// // DailyLevelPage::init from 0x608288 to 0x608af6 (2158 bytes) // // 1 xrefs: // > DailyLevelPage::create @ 0x608c42 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:54:46 +0000 // int __fastcall DailyLevelPage::init(int a1, int a2) { int *v3; // r0 int v4; // r3 cocos2d::CCDirector *v5; // r0 cocos2d::CCLayer *WinSize; // r0 int v7; // r0 int v8; // r3 char *v9; // r5 int v10; // r5 void (__fastcall *v11)(int, float *); // r7 void (__fastcall *v12)(int, float *); // r7 void (__fastcall *v13)(int, float *); // r3 cocos2d::CCSprite *v14; // r0 int v15; // r5 void (__fastcall *v16)(int, float *); // r7 const char *v17; // r1 int i; // r8 cocos2d::CCSprite *v19; // r0 int *v20; // r5 const char *v21; // r1 int v22; // r3 int v23; // r7 void (__fastcall *v24)(int *, unsigned int); // r7 int v25; // r0 float v26; // s15 void (__fastcall *v27)(int *, unsigned int); // r7 int v28; // r0 void (__fastcall *v29)(int *, unsigned int); // r7 int v30; // r0 void (__fastcall *v31)(int *, unsigned int); // r7 int v32; // r0 float v33; // s14 void (__fastcall *v34)(int *, float *); // r10 int v35; // r0 cocos2d::CCMenu *v36; // r5 int v37; // r5 void (__fastcall *v38)(int, float *); // r6 const char *v39; // r1 int v40; // r0 int v41; // r6 const cocos2d::CCPoint *v42; // r10 void (__fastcall *v43)(int, float *); // r8 const char *v44; // r2 cocos2d::CCLabelBMFont *v45; // r0 float v46; // r1 int v47; // r6 void (__fastcall *v48)(int, float *); // r8 int v49; // r0 float v50; // s19 void (__fastcall *v51)(int, float *); // r8 float *v52; // r0 int v53; // r6 float v54; // s18 float v55; // r0 LoadingCircle *v56; // r0 cocos2d::CCLayerColor *v57; // r0 int v58; // r3 int v59; // r6 void (__fastcall *v60)(int, float *); // r7 LoadingCircle *v61; // r0 cocos2d::CCLayerColor *v62; // r0 int v63; // r3 int v64; // r6 void (__fastcall *v65)(int, float *); // r7 GameLevelManager *v66; // r0 double v67; // d8 _DWORD *v68; // r0 GameLevelManager *DailyTimer; // r0 _DWORD *v70; // r0 int *ActiveDailyID; // r0 _DWORD *v72; // r0 const char *v73; // r5 _DWORD *v74; // r0 GameLevelManager *hasDailyStateBeenLoaded; // r0 GameStatsManager *v76; // r0 GameLevelManager *v77; // r0 GJGameLevel *SavedDailyLevel; // r1 GameLevelManager *GJDailyLevelState; // r0 GameLevelManager *v80; // r0 GameLevelManager *v81; // r0 int v84; // [sp+Ch] [bp-80h] void (__fastcall *v85)(int, float *); // [sp+10h] [bp-7Ch] float v86; // [sp+24h] [bp-68h] BYREF float v87; // [sp+28h] [bp-64h] int (__fastcall *v88)(DailyLevelPage *, cocos2d::CCObject *); // [sp+2Ch] [bp-60h] int v89; // [sp+30h] [bp-5Ch] int (__fastcall *v90)(DailyLevelPage *, cocos2d::CCObject *); // [sp+34h] [bp-58h] int v91; // [sp+38h] [bp-54h] _DWORD v92[2]; // [sp+3Ch] [bp-50h] BYREF int v93[2]; // [sp+44h] [bp-48h] BYREF cocos2d::CCSprite *v94; // [sp+4Ch] [bp-40h] int v95[2]; // [sp+50h] [bp-3Ch] BYREF cocos2d::CCSprite *v96; // [sp+58h] [bp-34h] int v97[2]; // [sp+5Ch] [bp-30h] BYREF char *v98; // [sp+64h] [bp-28h] char v99; // [sp+68h] [bp-24h] BYREF char v100; // [sp+69h] [bp-23h] BYREF cocos2d::CCLabelBMFont *v101; // [sp+70h] [bp-1Ch] float v102[4]; // [sp+74h] [bp-18h] BYREF FLAlertLayer::incrementForcePrio((cocos2d::CCObject *)a1); v102[0] = -1.034e-25; v84 = cocos2d::CCLayerColor::initWithColor(a1, v102); if ( !v84 ) return v84; v93[0] = 0; v93[1] = 0; *(_DWORD *)(a1 + 556) = a2; v94 = nullptr; v95[0] = 0; v95[1] = 0; v96 = nullptr; v97[0] = 0; v97[1] = 0; v98 = nullptr; if ( a2 == 1 ) { std::string::assign(v93, "weeklyLevelLabel_001.png"); std::string::assign(v95, "gauntletCorner_001.png"); v3 = std::string::assign(v97, "GJ_square05.png"); v4 = -2; } else if ( a2 == 2 ) { std::string::assign(v93, "eventLevelLabel_001.png"); std::string::assign(v95, "dailyLevelCorner_001.png"); v3 = std::string::assign(v97, "GJ_square05.png"); v4 = -3; } else { std::string::assign(v93, "dailyLevelLabel_001.png"); std::string::assign(v95, "dailyLevelCorner_001.png"); v3 = std::string::assign(v97, "GJ_square01.png"); v4 = -1; } *(_DWORD *)(a1 + 560) = v4; *(_DWORD *)(GameManager::sharedState((GameManager *)v3) + 856) = a1; (*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 500))(a1, 1); v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, int))(*(_DWORD *)a1 + 536))(a1, 1); cocos2d::CCDirector::sharedDirector(v5); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v86); v7 = cocos2d::CCLayer::create(WinSize); v8 = *(_DWORD *)a1; *(_DWORD *)(a1 + 460) = v7; (*(void (__fastcall **)(int, int))(v8 + 228))(a1, v7); if ( (v97[0] & 1) != 0 ) v9 = v98; else v9 = (char *)v97 + 1; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v102, 0.0, 0.0, 80.0, 80.0); v10 = cocos2d::extension::CCScale9Sprite::create(v9, v102); (*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 456))(v10, 255); v11 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v10 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v102, 420.0, 280.0); v11(v10, v102); (*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v10, -1); v12 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v10 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, v86 * 0.5, v87 * 0.5); v12(v10, v102); if ( *(_DWORD *)(a1 + 556) == 2 ) { v13 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v10 + 480); LOWORD(v102[0]) = 12222; BYTE2(v102[0]) = -14; v13(v10, v102); } *(_DWORD *)(a1 + 500) = -1; if ( (v93[0] & 1) != 0 ) v14 = v94; else v14 = (cocos2d::CCSprite *)((char *)v93 + 1); v15 = cocos2d::CCSprite::createWithSpriteFrameName(v14, (const char *)(LOBYTE(v93[0]) << 31)); (*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v15, 20); v16 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v15 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, v86 * 0.5, (float)((float)(v87 * 0.5) + 140.0) - 29.0); v16(v15, v102); for ( i = 0; i != 4; ++i ) { if ( (v95[0] & 1) != 0 ) v19 = v96; else v19 = (cocos2d::CCSprite *)((char *)v95 + 1); v20 = (int *)cocos2d::CCSprite::createWithSpriteFrameName(v19, v17); (*(void (__fastcall **)(_DWORD, int *, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v20, 8); if ( *(_DWORD *)(a1 + 556) == 1 ) { v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v21); (*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 64))(v23, 1050253722); (*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 72))(v23, 1061997773); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v23 + 480))(v23, &unk_BEE7CC); (*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 180))(v23, -1036779520); v85 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v23 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, 2.0, 2.0); v85(v23, v102); (*(void (__fastcall **)(int *, int, int))(*v20 + 232))(v20, v23, 1); (*(void (__fastcall **)(int *, int))(*v20 + 80))(v20, 1059145646); } v22 = *v20; switch ( i ) { case 2: v27 = *(void (__fastcall **)(int *, unsigned int))(v22 + 64); v28 = (*(int (__fastcall **)(int *))(v22 + 68))(v20); v27(v20, v28 ^ 0x80000000); v29 = *(void (__fastcall **)(int *, unsigned int))(*v20 + 72); v30 = (*(int (__fastcall **)(int *))(*v20 + 76))(v20); v29(v20, v30 ^ 0x80000000); (*(void (__fastcall **)(int *, _DWORD))(*v20 + 172))(v20, 0); v26 = 115.0; LABEL_29: v33 = 185.0; goto LABEL_30; case 3: v31 = *(void (__fastcall **)(int *, unsigned int))(v22 + 64); v32 = (*(int (__fastcall **)(int *))(v22 + 68))(v20); v31(v20, v32 ^ 0x80000000); v26 = -115.0; goto LABEL_29; case 1: v24 = *(void (__fastcall **)(int *, unsigned int))(v22 + 72); v25 = (*(int (__fastcall **)(int *))(v22 + 76))(v20); v24(v20, v25 ^ 0x80000000); v26 = 115.0; break; default: v26 = -115.0; break; } v33 = -185.0; LABEL_30: v34 = *(void (__fastcall **)(int *, float *))(*v20 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, v33 + (float)(v86 * 0.5), v26 + (float)(v87 * 0.5)); v34(v20, v102); } v35 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v17); v89 = 0; v88 = DailyLevelPage::onClose; v36 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v35, 0, a1, (int)DailyLevelPage::onClose, 0); CCMenuItemSpriteExtra::setSizeMult((int)v36, 1.6); v37 = cocos2d::CCMenu::create(v36, nullptr); *(_DWORD *)(a1 + 444) = v37; v38 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v37 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, (float)((float)(v86 * 0.5) - 210.0) + 10.0, (float)((float)(v87 * 0.5) + 140.0) - 10.0); v38(v37, v102); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(a1 + 460) + 232))( *(_DWORD *)(a1 + 460), *(_DWORD *)(a1 + 444), 10); v40 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_safeBtn_001.png", v39); v91 = 0; v90 = DailyLevelPage::onTheSafe; v41 = CCMenuItemSpriteExtra::create(v40, 0, a1, (int)DailyLevelPage::onTheSafe, 0); CCMenuItemSpriteExtra::setSizeMult(v41, 1.6); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v41); v42 = *(const cocos2d::CCPoint **)(a1 + 444); v43 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v41 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v92, (float)((float)(v86 * 0.5) + 210.0) - 30.0, (float)((float)(v87 * 0.5) + 140.0) - 30.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v102, v42); v43(v41, v102); DailyLevelPage::getDailyTimeString((DailyLevelPage *)&v99, a1, 0); if ( (v99 & 1) != 0 ) v45 = v101; else v45 = (cocos2d::CCLabelBMFont *)&v100; *(_DWORD *)(a1 + 532) = cocos2d::CCLabelBMFont::create(v45, "goldFont.fnt", v44); std::string::~string((int)&v99); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(a1 + 460) + 232))( *(_DWORD *)(a1 + 460), *(_DWORD *)(a1 + 532), 20); if ( a2 == 2 ) v46 = 0.4; else v46 = 0.5; (*(void (__fastcall **)(_DWORD, float))(**(_DWORD **)(a1 + 532) + 80))( *(_DWORD *)(a1 + 532), COERCE_FLOAT(LODWORD(v46))); v47 = *(_DWORD *)(a1 + 532); v48 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v47 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, 0.0, 0.5); v48(v47, v102); v49 = *(_DWORD *)(a1 + 532); v50 = v86 * 0.5; v51 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v49 + 92); v52 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v49 + 164))(v49); v53 = *(_DWORD *)(a1 + 532); v54 = *v52; v55 = (*(float (__fastcall **)(int))(*(_DWORD *)v53 + 84))(v53); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, v50 - (float)((float)(v54 * v55) * 0.5), (float)((float)(v87 * 0.5) - 140.0) + 15.0); v51(v53, v102); v92[0] = DailyLevelPage::updateTimers; v92[1] = 0; v56 = (LoadingCircle *)cocos2d::CCNode::schedule(a1, DailyLevelPage::updateTimers, 0, 1065353216); v57 = LoadingCircle::create(v56); v58 = *(_DWORD *)(a1 + 460); *(_DWORD *)(a1 + 536) = v57; *((_DWORD *)v57 + 111) = v58; *(_BYTE *)(*(_DWORD *)(a1 + 536) + 448) = 0; LoadingCircle::show(*(cocos2d::CCNode ***)(a1 + 536)); v59 = *(_DWORD *)(*(_DWORD *)(a1 + 536) + 440); v60 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v59 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, v86 * 0.5, (float)((float)(v87 * 0.5) - 140.0) + 17.0); v60(v59, v102); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(*(_DWORD *)(a1 + 536) + 440) + 80))( *(_DWORD *)(*(_DWORD *)(a1 + 536) + 440), 1049582633); v61 = (LoadingCircle *)(*(int (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 536) + 172))( *(_DWORD *)(a1 + 536), 0); v62 = LoadingCircle::create(v61); v63 = *(_DWORD *)(a1 + 460); *(_DWORD *)(a1 + 540) = v62; *((_DWORD *)v62 + 111) = v63; *(_BYTE *)(*(_DWORD *)(a1 + 540) + 448) = 0; LoadingCircle::show(*(cocos2d::CCNode ***)(a1 + 540)); v64 = *(_DWORD *)(*(_DWORD *)(a1 + 540) + 440); v65 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v64 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, v86 * 0.5, v87 * 0.5); v65(v64, v102); (*(void (__fastcall **)(_DWORD, float))(**(_DWORD **)(*(_DWORD *)(a1 + 540) + 440) + 80))( *(_DWORD *)(*(_DWORD *)(a1 + 540) + 440), 0.5); (*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 540) + 172))(*(_DWORD *)(a1 + 540), 0); v66 = (GameLevelManager *)clock_gettime(0, (struct timespec *)v102); v67 = (double)SLODWORD(v102[0]) + (double)SLODWORD(v102[1]) / 1000000000.0; v68 = (_DWORD *)GameLevelManager::sharedState(v66); DailyTimer = (GameLevelManager *)GameLevelManager::getDailyTimer(v68, *(_DWORD *)(a1 + 556)); if ( v67 > (double)(int)DailyTimer ) { v72 = (_DWORD *)GameLevelManager::sharedState(DailyTimer); DailyTimer = (GameLevelManager *)GameLevelManager::resetDailyLevelState(v72, *(_DWORD *)(a1 + 556)); } v70 = (_DWORD *)GameLevelManager::sharedState(DailyTimer); ActiveDailyID = (int *)GameLevelManager::getActiveDailyID(v70, *(_DWORD *)(a1 + 556)); v73 = (const char *)ActiveDailyID; if ( (int)ActiveDailyID > 0 ) { v76 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)ActiveDailyID); if ( GameStatsManager::hasCompletedDailyLevel(v76, v73) ) { SavedDailyLevel = nullptr; } else { v77 = (GameLevelManager *)GameLevelManager::sharedState(nullptr); SavedDailyLevel = (GJGameLevel *)GameLevelManager::getSavedDailyLevel(v77, v73); } ActiveDailyID = DailyLevelPage::createDailyNode((DailyLevelPage *)a1, SavedDailyLevel, 1, nullptr, nullptr); } v74 = (_DWORD *)GameLevelManager::sharedState((GameLevelManager *)ActiveDailyID); hasDailyStateBeenLoaded = (GameLevelManager *)GameLevelManager::hasDailyStateBeenLoaded(v74, *(_DWORD *)(a1 + 556)); if ( hasDailyStateBeenLoaded ) { GJDailyLevelState = (GameLevelManager *)(*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)a1 + 676))( a1, *(_DWORD *)(a1 + 556)); } else { if ( *(_DWORD *)(a1 + 556) != 2 ) { (*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 532) + 172))(*(_DWORD *)(a1 + 532), 0); hasDailyStateBeenLoaded = (GameLevelManager *)(*(int (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 536) + 172))( *(_DWORD *)(a1 + 536), 1); } v81 = (GameLevelManager *)GameLevelManager::sharedState(hasDailyStateBeenLoaded); GJDailyLevelState = (GameLevelManager *)GameLevelManager::getGJDailyLevelState(v81, *(_DWORD *)(a1 + 556)); if ( !*(_DWORD *)(a1 + 548) ) GJDailyLevelState = (GameLevelManager *)(*(int (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 540) + 172))( *(_DWORD *)(a1 + 540), 1); } v80 = (GameLevelManager *)GameLevelManager::sharedState(GJDailyLevelState); *((_DWORD *)v80 + 231) = a1 + 524; *(_DWORD *)(GameLevelManager::sharedState(v80) + 824) = a1 + 528; std::string::~string((int)v97); std::string::~string((int)v95); std::string::~string((int)v93); return v84; }
GD Web Decomp Icon

GD Web Decomp

Raw Source