// // DailyLevelNode::init from 0x607150 to 0x607926 (2006 bytes) // // 1 xrefs: // > DailyLevelNode::create @ 0x6079a4 // // 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:45 +0000 // cocos2d::CCDirector *__fastcall DailyLevelNode::init(DailyLevelNode *this, GJGameLevel *a2, DailyLevelPage *a3, int a4) { cocos2d::CCDirector *v7; // r0 int v8; // r0 cocos2d::CCTouchDispatcher *v9; // r0 int v10; // r3 int v11; // r7 char *v12; // r1 float v13; // s17 const char *v14; // r5 int v15; // r0 int v16; // r5 void (__fastcall *v17)(int, _DWORD *); // r2 void (__fastcall *v18)(int, _DWORD *); // r10 float v19; // s16 void (__fastcall *v20)(int, _DWORD *); // r10 float v21; // r2 LevelCell *v22; // r0 LevelCell *v23; // r10 void (__fastcall *v24)(LevelCell *, _DWORD *); // r5 const char *v25; // r1 cocos2d::CCSprite *v26; // r0 int v27; // r6 float v28; // s17 void (__fastcall *v29)(int, _DWORD *); // r11 const char *v30; // r1 const char *v31; // r2 int v32; // r6 void (__fastcall *v33)(int, _DWORD *); // r11 void (__fastcall *v34)(int, _DWORD *); // r11 int v35; // r7 cocos2d::CCMenu *v36; // r7 cocos2d::CCMenuItem *v37; // r1 int v38; // r7 void (__fastcall *v39)(int, _DWORD *); // r11 int v40; // r0 int v41; // r7 int v42; // r0 void (__fastcall *v43)(int, _DWORD *); // r10 int v44; // r11 const char *v45; // r1 cocos2d::CCString *v46; // r0 cocos2d::CCLabelBMFont *CString; // r0 const char *v48; // r2 int v49; // r7 void (__fastcall *v50)(int, _DWORD *); // r8 void (__fastcall *v51)(int, _DWORD *); // r8 int v52; // r5 cocos2d::CCMenu *v53; // r0 cocos2d::CCMenuItem *v54; // r1 int v55; // r0 int v56; // r3 int v57; // r5 void (__fastcall *v58)(int, _BYTE *); // r7 const char *v59; // r2 int v60; // r8 void (__fastcall *v61)(int, _BYTE *); // r5 const char *v62; // r1 int v63; // r5 void (__fastcall *v64)(int, _BYTE *); // r4 void (__fastcall *v65)(int, _BYTE *); // r4 int v66; // r5 int v67; // r7 GameStatsManager *v68; // r0 GameStatsManager *v69; // r0 const char *BonusDiamonds; // r0 cocos2d::CCString *v71; // r0 cocos2d::CCLabelBMFont *v72; // r0 const char *v73; // r2 int v74; // r5 void (__fastcall *v75)(int, _BYTE *); // r4 float v76; // s16 float v77; // s16 float v78; // s17 float v79; // s16 float v80; // s17 float v81; // r0 void (__fastcall *v82)(int, _BYTE *); // r6 float v83; // s16 float v84; // s18 float v85; // r0 void (__fastcall *v86)(int, _BYTE *); // r6 int v87; // r7 void (__fastcall *v88)(int, _BYTE *); // r6 int v89; // r7 float v90; // s16 float v91; // r0 const char *v92; // r2 int v93; // r0 cocos2d::CCDirector *v95; // [sp+Ch] [bp-58h] _BYTE v97[8]; // [sp+1Ch] [bp-48h] BYREF _BYTE v98[8]; // [sp+24h] [bp-40h] BYREF _DWORD (*v99)(DailyLevelNode *__hidden, cocos2d::CCObject *); // [sp+2Ch] [bp-38h] int v100; // [sp+30h] [bp-34h] int v101[2]; // [sp+34h] [bp-30h] BYREF const char *v102; // [sp+3Ch] [bp-28h] int v103[2]; // [sp+40h] [bp-24h] BYREF cocos2d::CCSprite *v104; // [sp+48h] [bp-1Ch] _DWORD v105[4]; // [sp+4Ch] [bp-18h] BYREF v7 = (cocos2d::CCDirector *)cocos2d::CCNode::init(this); v95 = v7; if ( v7 ) { v8 = cocos2d::CCDirector::sharedDirector(v7); v9 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v8 + 80))(v8); cocos2d::CCTouchDispatcher::registerForcePrio(v9, this, 2, 0); if ( a2 ) { *((_DWORD *)this + 67) = a2; cocos2d::CCObject::retain(a2); } *((_DWORD *)this + 68) = a3; v101[0] = 0; v101[1] = 0; v102 = nullptr; v103[0] = 0; v103[1] = 0; v104 = nullptr; v10 = *((_DWORD *)a3 + 139); if ( v10 == 1 ) { std::string::assign(v101, "GJ_square05.png"); v12 = "gj_weeklyCrown_001.png"; } else if ( v10 == 2 ) { std::string::assign(v101, "GJ_square04.png"); v12 = "gj_eventCrown_001.png"; } else { std::string::assign(v101, "GJ_square02.png"); v12 = "gj_dailyCrown_001.png"; } std::string::assign(v103, v12); v11 = *((_DWORD *)this + 67); if ( v11 ) v11 = *(_DWORD *)(v11 + 688) - *(_DWORD *)(v11 + 692) > 99; v13 = COERCE_FLOAT(CustomListView::getCellHeight(4)); if ( v11 ) { v14 = "GJ_square03.png"; } else if ( (v101[0] & 1) != 0 ) { v14 = v102; } else { v14 = (char *)v101 + 1; } cocos2d::CCRect::CCRect((cocos2d::CCRect *)v105, 0.0, 0.0, 80.0, 80.0); v15 = cocos2d::extension::CCScale9Sprite::create(v14, v105); v16 = v15; if ( *(_DWORD *)(*((_DWORD *)this + 68) + 556) == 1 && !v11 ) { v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 480); LOWORD(v105[0]) = -20561; BYTE2(v105[0]) = -81; v17(v15, v105); } v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 160); v19 = v13 + 26.0; cocos2d::CCSize::CCSize((cocos2d::CCSize *)v105, 380.0, v13 + 26.0); v18(v16, v105); v20 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 0.0, 0.0); v20(v16, v105); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v16, 1); if ( *((_DWORD *)this + 67) ) { v22 = LevelCell::create((LevelCell *)0x43B40000, v13, v21); *((_BYTE *)v22 + 430) = 1; v23 = v22; LevelCell::loadFromLevel(v22, a2); (*(void (__fastcall **)(DailyLevelNode *, LevelCell *, int))(*(_DWORD *)this + 232))(this, v23, 2); v24 = *(void (__fastcall **)(LevelCell *, _DWORD *))(*(_DWORD *)v23 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, -180.0, (float)-(float)(v13 * 0.5) - 2.0); v24(v23, v105); if ( (v103[0] & 1) != 0 ) v26 = v104; else v26 = (cocos2d::CCSprite *)((char *)v103 + 1); v27 = cocos2d::CCSprite::createWithSpriteFrameName(v26, v25); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v27, 2); v28 = v19 * 0.5; v29 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 0.0, (float)((float)(v19 * 0.5) + 0.0) + 12.0); v29(v27, v105); if ( a4 ) { v32 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"New!", "goldFont.fnt", v31); v33 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v32 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 1.0, 1.0); v33(v32, v105); v34 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v32 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 182.0, v28 - 5.0); v34(v32, v105); (*(void (__fastcall **)(int, int))(*(_DWORD *)v32 + 80))(v32, 1058642330); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v32, 3); } if ( v11 ) { v35 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_rewardBtn_001.png", v30); (*(void (__fastcall **)(int, int))(*(_DWORD *)v35 + 80))(v35, 1065353216); v99 = DailyLevelNode::onClaimReward; v100 = 0; v36 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v35, 0, (int)this, (int)DailyLevelNode::onClaimReward, 0); CCMenuItemSpriteExtra::setSizeMult((int)v36, 1.1); v38 = cocos2d::CCMenu::createWithItem(v36, v37); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v38, 10); v39 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v38 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 150.0, -2.0); v39(v38, v105); v40 = (*(int (__fastcall **)(int))(*(_DWORD *)v38 + 96))(v38); cocos2d::CCPoint::operator=((char *)this + 280, v40); v41 = *((_DWORD *)v23 + 105); if ( v41 ) { v42 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v41 + 536))(*((_DWORD *)v23 + 105)); (*(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 80))(v42, 1053609165); v43 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v41 + 92); v44 = (*(int (__fastcall **)(int))(*(_DWORD *)v41 + 96))(v41); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, -55.0, 0.0); cocos2d::CCPoint::operator+(v105, v44, v98); v43(v41, v105); } } if ( *((_DWORD *)this + 67) ) { v45 = (const char *)(*((_DWORD *)a2 + 186) - *((_DWORD *)a2 + 187)); if ( (int)v45 <= 200000 ) { if ( (int)v45 > 100000 ) v45 -= 100000; v46 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"#%i", v45); } else { v46 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"#%i", v45 - 200000); } CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v46); v49 = cocos2d::CCLabelBMFont::create(CString, "chatFont.fnt", v48); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v49 + 536))(v49, &unk_BEE7CC); (*(void (__fastcall **)(int, int))(*(_DWORD *)v49 + 512))(v49, 150); v50 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v49 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 1.0, 0.0); v50(v49, v105); (*(void (__fastcall **)(int, int))(*(_DWORD *)v49 + 80))(v49, 1058642330); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v49, 3); v51 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v49 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105, 183.0, 7.0 - (float)(v19 * 0.5)); v51(v49, v105); } v52 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v30); (*(void (__fastcall **)(int, int))(*(_DWORD *)v52 + 80))(v52, 1060320051); v105[0] = DailyLevelNode::onSkipLevel; v105[1] = 0; v53 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v52, 0, (int)this, (int)DailyLevelNode::onSkipLevel, 0); v55 = cocos2d::CCMenu::createWithItem(v53, v54); v56 = *(_DWORD *)this; *((_DWORD *)this + 72) = v55; (*(void (__fastcall **)(DailyLevelNode *, int, int))(v56 + 232))(this, v55, 10); v57 = *((_DWORD *)this + 72); v58 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v57 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, -186.0, v28 - 4.0); v58(v57, v98); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 72) + 172))(*((_DWORD *)this + 72), 0); v60 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Bonus:", "goldFont.fnt", v59); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v60, 10); v61 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v60 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, 1.0, 0.5); v61(v60, v98); (*(void (__fastcall **)(int, int))(*(_DWORD *)v60 + 80))(v60, 1058642330); if ( (unsigned int)(*(_DWORD *)(*((_DWORD *)this + 68) + 556) - 1) > 1 ) { v67 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_bigDiamond_001.png", v62); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v67, 10); v68 = (GameStatsManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v67 + 80))(v67, 1061997773); v69 = (GameStatsManager *)GameStatsManager::sharedState(v68); BonusDiamonds = (const char *)GameStatsManager::getBonusDiamonds( v69, *(_DWORD *)(*((_DWORD *)this + 67) + 772) - *(_DWORD *)(*((_DWORD *)this + 67) + 776)); v71 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%ix", BonusDiamonds); v72 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v71); v74 = cocos2d::CCLabelBMFont::create(v72, "bigFont.fnt", v73); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v74, 10); v75 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v74 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, 1.0, 0.5); v75(v74, v98); (*(void (__fastcall **)(int, int))(*(_DWORD *)v74 + 80))(v74, 1058642330); v76 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v67 + 164))(v67); v77 = v76 * COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v67 + 84))(v67)); v78 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v74 + 164))(v74); v79 = v77 + (float)(v78 * COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v74 + 84))(v74))); v80 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v60 + 164))(v60); v81 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v60 + 84))(v60)); v82 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v67 + 92); v83 = (float)(v79 + (float)(v80 * v81)) + 25.0; v84 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v67 + 164))(v67); v85 = (*(float (__fastcall **)(int))(*(_DWORD *)v67 + 84))(v67); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v98, (float)(v83 * 0.5) - (float)((float)(v84 * v85) * 0.5), -84.0); v82(v67, v98); v86 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v74 + 92); v87 = (*(int (__fastcall **)(int))(*(_DWORD *)v67 + 96))(v67); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, -20.0, 0.0); cocos2d::CCPoint::operator+(v98, v87, v97); v86(v74, v98); v88 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v60 + 92); v89 = (*(int (__fastcall **)(int))(*(_DWORD *)v74 + 96))(v74); v90 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v74 + 164))(v74); v91 = (*(float (__fastcall **)(int))(*(_DWORD *)v74 + 84))(v74); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, (float)-(float)(v91 * v90) - 5.0, 0.0); cocos2d::CCPoint::operator+(v98, v89, v97); v88(v60, v98); } else { v63 = GJChestSprite::create((GJChestSprite *)((char *)&dword_0 + 3), (int)v62); (*(void (__fastcall **)(DailyLevelNode *, int, int))(*(_DWORD *)this + 232))(this, v63, 10); (*(void (__fastcall **)(int, int))(*(_DWORD *)v63 + 80))(v63, 1050253722); v64 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v63 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, 30.0, -84.0); v64(v63, v98); v65 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v60 + 92); v66 = (*(int (__fastcall **)(int))(*(_DWORD *)v63 + 96))(v63); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, -25.0, 0.0); cocos2d::CCPoint::operator+(v98, v66, v97); v65(v60, v98); } } else { (*(void (__fastcall **)(int, void *))(*(_DWORD *)v16 + 480))(v16, &unk_BEE7CC); (*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 456))(v16, 75); v93 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"00:00:00", "bigFont.fnt", v92); *((_DWORD *)this + 69) = v93; (*(void (__fastcall **)(int, int))(*(_DWORD *)v93 + 80))(v93, 1056964608); (*(void (__fastcall **)(DailyLevelNode *, _DWORD, int))(*(_DWORD *)this + 232))(this, *((_DWORD *)this + 69), 3); *((_BYTE *)this + 293) = 1; } std::string::~string((int)v103); std::string::~string((int)v101); } return v95; }
GD Web Decomp Icon

GD Web Decomp

Raw Source