// // DailyLevelNode::init from 0xa6df54 to 0xa6ea54 (2816 bytes) // // 2 xrefs: // > DailyLevelNode::create @ 0xa6eb04 // > @ 0x70018 // // 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:00:22 +0000 // __int64 __fastcall DailyLevelNode::init(DailyLevelNode *this, GJGameLevel *a2, DailyLevelPage *a3, unsigned __int8 a4) { int v7; // w27 cocos2d::CCDirector *v8; // x0 unsigned int v9; // w25 __int64 v11; // x0 cocos2d::CCTouchDispatcher *v12; // x0 int v13; // w0 __int64 v14; // x0 _BOOL4 v15; // w26 float CellHeight; // s9 const char *v17; // x23 __int64 v18; // x0 __int64 v19; // x23 float v20; // s8 void (__fastcall *v21)(__int64, _QWORD *); // x28 void (__fastcall *v22)(__int64, _QWORD *); // x28 LevelCell *v23; // x0 LevelCell *v24; // x0 LevelCell *v25; // x23 void (__fastcall *v26)(LevelCell *, _QWORD *); // x28 cocos2d::CCSprite *v27; // x0 __int64 v28; // x24 float v29; // s9 void (__fastcall *v30)(__int64, _QWORD *); // x28 const char *v31; // x1 const char *v32; // x2 unsigned __int64 v33; // x1 cocos2d::CCString *v34; // x0 cocos2d::CCLabelBMFont *CString; // x0 const char *v36; // x2 __int64 v37; // x22 void (__fastcall *v38)(__int64, _QWORD *); // x23 void (__fastcall *v39)(__int64, _QWORD *); // x23 __int64 v40; // x22 cocos2d::CCMenu *v41; // x0 cocos2d::CCMenuItem *v42; // x1 __int64 v43; // x0 __int64 v44; // x3 __int64 v45; // x22 void (__fastcall *v46)(__int64, _QWORD *); // x23 const char *v47; // x2 __int64 v48; // x24 void (__fastcall *v49)(__int64, _QWORD *); // x22 const char *v50; // x1 __int64 v51; // x23 GameStatsManager *v52; // x0 GameStatsManager *v53; // x0 unsigned int BonusDiamonds; // w0 cocos2d::CCString *v55; // x0 cocos2d::CCLabelBMFont *v56; // x0 const char *v57; // x2 __int64 v58; // x22 void (__fastcall *v59)(__int64, _QWORD *); // x19 float v60; // s9 float v61; // s9 float v62; // s8 float v63; // s9 float v64; // s8 float v65; // s0 void (__fastcall *v66)(__int64, _QWORD *); // x19 float v67; // s8 float v68; // s9 float v69; // s0 void (__fastcall *v70)(__int64, _QWORD *); // x19 __int64 v71; // x23 void (__fastcall *v72)(__int64, _QWORD *); // x19 __int64 v73; // x23 float v74; // s8 float v75; // s0 __int64 v76; // x28 void (__fastcall *v77)(__int64, _QWORD *); // x24 void (__fastcall *v78)(__int64, _QWORD *); // x24 __int64 v79; // x24 cocos2d::CCMenu *v80; // x24 cocos2d::CCMenuItem *v81; // x1 __int64 v82; // x24 void (__fastcall *v83)(__int64, _QWORD *); // x26 __int64 v84; // x0 long double v85; // q0 __int64 v86; // x23 __int64 v87; // x0 void (__fastcall *v88)(__int64, _QWORD *); // x24 __int64 v89; // x26 __int64 v90; // x22 void (__fastcall *v91)(__int64, _QWORD *); // x19 __int64 v92; // x22 const char *v93; // x2 __int64 v94; // x0 void (__fastcall *v95)(__int64, _QWORD *); // x3 _BYTE v96[8]; // [xsp+70h] [xbp+70h] BYREF _QWORD v97[2]; // [xsp+78h] [xbp+78h] BYREF __int64 v98[2]; // [xsp+88h] [xbp+88h] BYREF void *v99; // [xsp+98h] [xbp+98h] char *v100[2]; // [xsp+A0h] [xbp+A0h] BYREF cocos2d::CCSprite *v101; // [xsp+B0h] [xbp+B0h] v7 = a4; v8 = (cocos2d::CCDirector *)(unsigned __int8)cocos2d::CCNode::init(this); v9 = (unsigned __int8)v8; if ( !(_BYTE)v8 ) return v9; v11 = cocos2d::CCDirector::sharedDirector(v8); v12 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 160LL))(v11); cocos2d::CCTouchDispatcher::registerForcePrio(v12, this, 2, 0); if ( a2 ) { *((_QWORD *)this + 41) = a2; cocos2d::CCObject::retain(a2); } *((_QWORD *)this + 42) = a3; v98[0] = 0; v13 = *((_DWORD *)a3 + 183); v98[1] = 0; v99 = nullptr; v100[0] = nullptr; v100[1] = nullptr; v101 = nullptr; if ( v13 == 1 ) { std::string::assign(v98, "GJ_square05.png"); std::string::assign((__int64 *)v100, "gj_weeklyCrown_001.png"); } else if ( v13 == 2 ) { std::string::assign(v98, "GJ_square04.png"); std::string::assign((__int64 *)v100, "gj_eventCrown_001.png"); } else { std::string::assign(v98, "GJ_square02.png"); std::string::assign((__int64 *)v100, "gj_dailyCrown_001.png"); } v14 = *((_QWORD *)this + 41); v15 = 0; if ( v14 ) v15 = *(_DWORD *)(v14 + 864) - *(_DWORD *)(v14 + 868) > 99; CellHeight = CustomListView::getCellHeight(4); if ( v15 ) { v17 = "GJ_square03.png"; } else { v17 = (char *)v98 + 1; if ( (v98[0] & 1) != 0 ) v17 = (const char *)v99; } cocos2d::CCRect::CCRect((cocos2d::CCRect *)v97, 0.0, 0.0, 80.0, 80.0); v18 = cocos2d::extension::CCScale9Sprite::create(v17, v97); v19 = v18; if ( !v15 && *(_DWORD *)(*((_QWORD *)this + 42) + 732LL) == 1 ) { v95 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v18 + 960LL); LOWORD(v97[0]) = -20561; BYTE2(v97[0]) = -81; v95(v18, v97); } v20 = CellHeight + 26.0; v21 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v19 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v97, 380.0, CellHeight + 26.0); v21(v19, v97); v22 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v19 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 0.0, 0.0); v22(v19, v97); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v19, 1); v23 = *((LevelCell **)this + 41); if ( v23 ) { v24 = LevelCell::create(v23, 360.0, CellHeight); *((_BYTE *)v24 + 570) = 1; v25 = v24; LevelCell::loadFromLevel(v24, a2); (*(void (__fastcall **)(DailyLevelNode *, LevelCell *, __int64))(*(_QWORD *)this + 464LL))(this, v25, 2); v26 = *(void (__fastcall **)(LevelCell *, _QWORD *))(*(_QWORD *)v25 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, -180.0, -2.0 - (float)(CellHeight * 0.5)); v26(v25, v97); v27 = (cocos2d::CCSprite *)((char *)v100 + 1); if ( ((__int64)v100[0] & 1) != 0 ) v27 = v101; v28 = cocos2d::CCSprite::createWithSpriteFrameName(v27, (const char *)LOBYTE(v100[0])); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v28, 2); v29 = v20 * 0.5; v30 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v28 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 0.0, (float)((float)(v20 * 0.5) + 0.0) + 12.0); v30(v28, v97); if ( v7 ) { v76 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"New!", "goldFont.fnt", v32); v77 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v76 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 1.0, 1.0); v77(v76, v97); v78 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v76 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 182.0, v29 - 5.0); v78(v76, v97); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v76 + 160LL))(v76, 0.6); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v76, 3); } if ( v15 ) { v79 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_rewardBtn_001.png", v31); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v79 + 160LL))(v79, 1.0); v80 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create( v79, 0, (__int64)this, (__int64)DailyLevelNode::onClaimReward, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v80, 1.1); v82 = cocos2d::CCMenu::createWithItem(v80, v81); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v82, 10); v83 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v82 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 150.0, -2.0); v83(v82, v97); v84 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v82 + 192LL))(v82); *(__n128 *)&v85 = cocos2d::CCPoint::operator=((char *)this + 352, v84); v86 = *((_QWORD *)v25 + 69); if ( v86 ) { v87 = (*(__int64 (__fastcall **)(__int64, long double))(*(_QWORD *)v86 + 1072LL))(v86, v85); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v87 + 160LL))(v87, 0.4); v88 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v86 + 184LL); v89 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v86 + 192LL))(v86); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, -55.0, 0.0); cocos2d::CCPoint::operator+(v97, v89); v88(v86, v97); } } if ( !*((_QWORD *)this + 41) ) goto LABEL_27; v33 = (unsigned int)(*((_DWORD *)a2 + 230) - *((_DWORD *)a2 + 231)); if ( (int)v33 <= 200000 ) { if ( (int)v33 > 100000 ) { v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"#%i", (const char *)(unsigned int)(v33 - 100000)); goto LABEL_26; } } else { v33 = (unsigned int)(v33 - 200000); } v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"#%i", (const char *)v33); LABEL_26: CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v34); v37 = cocos2d::CCLabelBMFont::create(CString, "chatFont.fnt", v36); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v37 + 1072LL))(v37, &unk_1174150); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v37 + 1024LL))(v37, 4294967190LL); v38 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v37 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 1.0, 0.0); v38(v37, v97); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v37 + 160LL))(v37, 0.6); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v37, 3); v39 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v37 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 183.0, 7.0 - (float)(v20 * 0.5)); v39(v37, v97); LABEL_27: v40 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v31); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v40 + 160LL))(v40, 0.7); v41 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create( v40, 0, (__int64)this, (__int64)DailyLevelNode::onSkipLevel, 0); v43 = cocos2d::CCMenu::createWithItem(v41, v42); v44 = *(_QWORD *)this; *((_QWORD *)this + 45) = v43; (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(v44 + 464))(this, v43, 10); v45 = *((_QWORD *)this + 45); v46 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v45 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, -186.0, v29 - 4.0); v46(v45, v97); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 45) + 344LL))(*((_QWORD *)this + 45), 0); v48 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Bonus:", "goldFont.fnt", v47); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v48, 10); v49 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v48 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 1.0, 0.5); v49(v48, v97); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL))(v48, 0.6); if ( (unsigned int)(*(_DWORD *)(*((_QWORD *)this + 42) + 732LL) - 1) <= 1 ) { v90 = GJChestSprite::create((GJChestSprite *)((char *)&dword_0 + 3), (int)v50); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v90, 10); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v90 + 160LL))(v90, 0.3); v91 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v90 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 30.0, -84.0); v91(v90, v97); v72 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v48 + 184LL); v92 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v90 + 192LL))(v90); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, -25.0, 0.0); cocos2d::CCPoint::operator+(v97, v92); } else { v51 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_bigDiamond_001.png", v50); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v51, 10); v52 = (GameStatsManager *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v51 + 160LL))(v51, 0.8); v53 = (GameStatsManager *)GameStatsManager::sharedState(v52); BonusDiamonds = GameStatsManager::getBonusDiamonds( v53, *(_DWORD *)(*((_QWORD *)this + 41) + 948LL) - *(_DWORD *)(*((_QWORD *)this + 41) + 952LL)); v55 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%ix", (const char *)BonusDiamonds); v56 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v55); v58 = cocos2d::CCLabelBMFont::create(v56, "bigFont.fnt", v57); (*(void (__fastcall **)(DailyLevelNode *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v58, 10); v59 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v58 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 1.0, 0.5); v59(v58, v97); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v58 + 160LL))(v58, 0.6); v60 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 328LL))(v51); v61 = v60 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v51 + 168LL))(v51); v62 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v58 + 328LL))(v58); v63 = v61 + (float)(v62 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v58 + 168LL))(v58)); v64 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 328LL))(v48); v65 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v48 + 168LL))(v48); v66 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v51 + 184LL); v67 = (float)((float)(v63 + (float)(v64 * v65)) + 25.0) * 0.5; v68 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 328LL))(v51); v69 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v51 + 168LL))(v51); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, v67 - (float)((float)(v68 * v69) * 0.5), -84.0); v66(v51, v97); v70 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v58 + 184LL); v71 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 192LL))(v51); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, -20.0, 0.0); cocos2d::CCPoint::operator+(v97, v71); v70(v58, v97); v72 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v48 + 184LL); v73 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v58 + 192LL))(v58); v74 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v58 + 328LL))(v58); v75 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v58 + 168LL))(v58); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, -5.0 - (float)(v74 * v75), 0.0); cocos2d::CCPoint::operator+(v97, v73); } v72(v48, v97); goto LABEL_30; } (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v19 + 960LL))(v19, &unk_1174150); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v19 + 912LL))(v19, 75); v94 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"00:00:00", "bigFont.fnt", v93); *((_QWORD *)this + 43) = v94; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v94 + 160LL))(v94, 0.5); (*(void (__fastcall **)(DailyLevelNode *, _QWORD, __int64))(*(_QWORD *)this + 464LL))(this, *((_QWORD *)this + 43), 3); *((_BYTE *)this + 369) = 1; LABEL_30: if ( ((__int64)v100[0] & 1) != 0 ) operator delete(v101); if ( (v98[0] & 1) != 0 ) operator delete(v99); return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source