// // LevelInfoLayer::setupLevelInfo from 0x1002c00d0 to 0x1002c0ce1 (3089 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x1002be136 // // 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 // void __fastcall LevelInfoLayer::setupLevelInfo(LevelInfoLayer *a1) { __int64 v1; // rsi cocos2d::CCArray *v3; // rax cocos2d::CCLabelBMFont *v4; // rax cocos2d::CCLabelBMFont *m_lengthLabel; // r13 cocos2d::CCLabelBMFont *v6; // rax cocos2d::CCLabelBMFont *m_exactLengthLabel; // r15 cocos2d::CCLabelBMFont *v8; // rax cocos2d::CCLabelBMFont *m_downloadsLabel; // r15 cocos2d::CCLabelBMFont *v10; // rax cocos2d::CCLabelBMFont *m_likesLabel; // r15 cocos2d::CCSprite *v12; // r13 cocos2d::CCLabelBMFont *v13; // rax cocos2d::CCLabelBMFont *m_orbsLabel; // r14 GJGameLevel *m_level; // rdi bool isPlatformer; // al float v17; // xmm0_4 bool v18; // cc bool v19; // r14 cocos2d::CCLabelBMFont *v20; // r15 __int64 v21; // rax cocos2d::CCSprite *m_likesIcon; // r15 cocos2d::CCSprite *v23; // r15 cocos2d::CCLabelBMFont *v24; // r15 __int64 v25; // rax cocos2d::CCLabelBMFont *v26; // r12 __int64 v27; // rax float v28; // xmm1_4 float v29; // xmm1_4 const char *v30; // rcx cocos2d::CCLabelBMFont *v31; // r15 unsigned __int64 *v32; // r12 cocos2d::CCSprite *m_orbsIcon; // r14 cocos2d::CCSprite *v34; // r14 cocos2d::CCLabelBMFont *v35; // r14 __int64 v36; // rax double v37; // xmm0_8 GJDifficultySprite *v38; // rax cocos2d::CCSprite *v39; // rax cocos2d::CCSprite *m_starsIcon; // r14 cocos2d::CCLabelBMFont *v41; // rax cocos2d::CCLabelBMFont *m_starsLabel; // r14 cocos2d::CCLabelBMFont *v43; // r14 unsigned __int64 *v44; // r12 double v45; // xmm0_8 GJGameLevel *v46; // rax cocos2d::CCSprite *v47; // r15 GameStatsManager *v48; // rax int v49; // r14d GameStatsManager *v50; // rax cocos2d::CCString *v51; // rax const char *CString; // r12 size_t v53; // rax size_t v54; // r14 char *v55; // r13 const char *v56; // rdi size_t v57; // r15 cocos2d::CCLabelBMFont *v58; // r14 float v59; // xmm0_4 unsigned __int64 *v60; // r15 unsigned int v61; // r14d __int64 v62; // rax cocos2d::CCSprite *v63; // [rsp+0h] [rbp-90h] float v64[2]; // [rsp+8h] [rbp-88h] BYREF unsigned __int64 v65; // [rsp+10h] [rbp-80h] BYREF int v66; // [rsp+18h] [rbp-78h] int v67; // [rsp+1Ch] [rbp-74h] cocos2d::CCSprite *v68; // [rsp+20h] [rbp-70h] cocos2d::CCSprite *v69; // [rsp+28h] [rbp-68h] unsigned __int64 *p_m_basePosition; // [rsp+30h] [rbp-60h] double __dst[2]; // [rsp+38h] [rbp-58h] BYREF void *__p; // [rsp+48h] [rbp-48h] unsigned __int64 v73; // [rsp+54h] [rbp-3Ch] BYREF float v74; // [rsp+5Ch] [rbp-34h] float v75; // [rsp+60h] [rbp-30h] bool v76; // [rsp+67h] [rbp-29h] v3 = (cocos2d::CCArray *)sub_10071F9E0(a1, v1); a1->m_icons = v3; cocos2d::CCObject::retain(v3); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v64); v68 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); v63 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png"); a1->m_orbsIcon = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); a1->m_likesIcon = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png"); v4 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); a1->m_lengthLabel = v4; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v4->setScale)(v4, 0.5); m_lengthLabel = a1->m_lengthLabel; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_lengthLabel->setAnchorPoint)(m_lengthLabel, __dst); v6 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); a1->m_exactLengthLabel = v6; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v6->setScale)(v6, 0.5); m_exactLengthLabel = a1->m_exactLengthLabel; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_exactLengthLabel->setAnchorPoint)( m_exactLengthLabel, __dst); v8 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); a1->m_downloadsLabel = v8; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v8->setScale)(v8, 0.5); m_downloadsLabel = a1->m_downloadsLabel; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_downloadsLabel->setAnchorPoint)(m_downloadsLabel, __dst); v10 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); a1->m_likesLabel = v10; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v10->setScale)(v10, 0.5); m_likesLabel = a1->m_likesLabel; sub_10028CBE0((float *)__dst, 0.0, 0.5); v12 = v68; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_likesLabel->setAnchorPoint)(m_likesLabel, __dst); v13 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt"); a1->m_orbsLabel = v13; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v13->setScale)(v13, 0.5); m_orbsLabel = a1->m_orbsLabel; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_orbsLabel->setAnchorPoint)(m_orbsLabel, __dst); sub_10071FCD0(a1->m_icons, v12); sub_10071FCD0(a1->m_icons, v63); sub_10071FCD0(a1->m_icons, a1->m_orbsIcon); sub_10071FCD0(a1->m_icons, a1->m_likesIcon); sub_10071FCD0(a1->m_icons, a1->m_downloadsLabel); sub_10071FCD0(a1->m_icons, a1->m_lengthLabel); sub_10071FCD0(a1->m_icons, a1->m_exactLengthLabel); sub_10071FCD0(a1->m_icons, a1->m_likesLabel); sub_10071FCD0(a1->m_icons, a1->m_orbsLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v12); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v63); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, a1->m_orbsIcon); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, a1->m_likesIcon); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_downloadsLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_lengthLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_exactLengthLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_likesLabel); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_orbsLabel); m_level = a1->m_level; LODWORD(m_likesLabel) = m_level->m_stars.random; LODWORD(m_orbsLabel) = m_level->m_stars.seed; isPlatformer = GJGameLevel::isPlatformer(m_level); v75 = (float)(v64[0] * 0.5) + 80.0; v74 = v75 + 33.0; v17 = (float)(v64[1] * 0.5) + 51.0; a1->m_iconOffset = 10.0; v67 = (int)m_orbsLabel; v18 = (int)m_likesLabel <= (int)m_orbsLabel; *(float *)&v69 = (float)(2 * ((int)m_likesLabel <= (int)m_orbsLabel) + 28); v66 = (int)m_likesLabel; v76 = (int)m_likesLabel > (int)m_orbsLabel; v19 = isPlatformer; if ( !v18 ) v17 = v17 + 10.0; *(float *)&p_m_basePosition = v17; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v63->setAnchorPoint)(v63, __dst); sub_10028CBE0((float *)__dst, v75, *(float *)&p_m_basePosition + *(float *)&v69); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v63->setPosition)(v63, __dst); v20 = a1->m_downloadsLabel; v21 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v63->getPosition)(v63); sub_10028CBE0((float *)__dst, v74, *(float *)(v21 + 4)); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v20->setPosition)(v20, __dst); m_likesIcon = a1->m_likesIcon; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, double *))m_likesIcon->setAnchorPoint)(m_likesIcon, __dst); v23 = a1->m_likesIcon; sub_10028CBE0((float *)__dst, v75, *(float *)&p_m_basePosition + 1.0); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v23->setPosition)(v23, __dst); v24 = a1->m_likesLabel; v25 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_likesIcon->getPosition)(a1->m_likesIcon); sub_10028CBE0((float *)__dst, v74, *(float *)(v25 + 4)); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v24->setPosition)(v24, __dst); sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v12->setAnchorPoint)(v12, __dst); sub_10028CBE0((float *)__dst, v75, *(float *)&p_m_basePosition - *(float *)&v69); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v12->setPosition)(v12, __dst); v26 = a1->m_lengthLabel; v27 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v12->getPosition)(v12); if ( v19 ) v28 = 6.0; else v28 = 0.0; v29 = v28 + *(float *)(v27 + 4); v30 = "star_small01_001.png"; if ( v19 ) v30 = "moon_small01_001.png"; v68 = (cocos2d::CCSprite *)v30; sub_10028CBE0((float *)__dst, v74, v29); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v26->setPosition)(v26, __dst); v31 = a1->m_exactLengthLabel; v32 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_lengthLabel->getPosition)(a1->m_lengthLabel); sub_10028CBE0((float *)&v73, 0.0, -14.0); sub_10028CCE0(__dst, v32, &v73); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v31->setPosition)(v31, __dst); m_orbsIcon = a1->m_orbsIcon; sub_10028CBE0((float *)__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, double *))m_orbsIcon->setAnchorPoint)(m_orbsIcon, __dst); v34 = a1->m_orbsIcon; sub_10028CBE0((float *)__dst, v75 + 1.0, *(float *)&p_m_basePosition - (float)(*(float *)&v69 + *(float *)&v69)); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v34->setPosition)(v34, __dst); v35 = a1->m_orbsLabel; v36 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_orbsIcon->getPosition)(a1->m_orbsIcon); sub_10028CBE0((float *)__dst, v74, *(float *)(v36 + 4)); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v35->setPosition)(v35, __dst); LODWORD(v35) = v76; ((void (__fastcall *)(cocos2d::CCSprite *, bool))a1->m_orbsIcon->setVisible)(a1->m_orbsIcon, v76); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_orbsLabel->setVisible)( a1->m_orbsLabel, (unsigned int)v35); sub_10028CBE0((float *)__dst, (float)(v64[0] * 0.5) + -100.0, *(float *)&p_m_basePosition + 5.0); v37 = sub_10028CC90(&a1->m_basePosition, __dst); v38 = GJDifficultySprite::create(1, Long); a1->m_difficultySprite = v38; ((void (__fastcall *)(LevelInfoLayer *, GJDifficultySprite *, __int64, double))a1->addChild_0)(a1, v38, 3, v37); ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCPoint *))a1->m_difficultySprite->setPosition)( a1->m_difficultySprite, &a1->m_basePosition); v39 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v68); a1->m_starsIcon = v39; ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v39); m_starsIcon = a1->m_starsIcon; sub_10028CBE0((float *)&v73, 8.0, -30.0); p_m_basePosition = (unsigned __int64 *)&a1->m_basePosition; sub_10028CCE0(__dst, (unsigned __int64 *)&a1->m_basePosition, &v73); ((void (__fastcall *)(cocos2d::CCSprite *, double *))m_starsIcon->setPosition)(m_starsIcon, __dst); v41 = cocos2d::CCLabelBMFont::create_3("0", "bigFont.fnt"); a1->m_starsLabel = v41; ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v41); m_starsLabel = a1->m_starsLabel; sub_10028CBE0((float *)__dst, 1.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_starsLabel->setAnchorPoint)(m_starsLabel, __dst); v43 = a1->m_starsLabel; v44 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_starsIcon->getPosition)(a1->m_starsIcon); sub_10028CBE0((float *)&v73, -8.0, 0.0); sub_10028CCE0(__dst, v44, &v73); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v43->setPosition)(v43, __dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_starsLabel->setScale)(a1->m_starsLabel, 0.40000001); *(_QWORD *)&v45 = *(unsigned int *)(((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_starsLabel->getPosition)(a1->m_starsLabel) + 4); a1->m_baseStarsY = *(float *)&v45; if ( v66 > v67 ) { v46 = a1->m_level; if ( v46->m_dailyID.random > v46->m_dailyID.seed || v46->m_gauntletLevel ) { v47 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCSprite *))a1->addChild)(a1, v47); v48 = GameStatsManager::sharedState(); *(float *)&v49 = COERCE_FLOAT(GameStatsManager::getBaseDiamonds(v48, a1->m_level->m_stars.random - a1->m_level->m_stars.seed)); v50 = GameStatsManager::sharedState(); v75 = COERCE_FLOAT(GameStatsManager::getAwardedDiamondsForLevel(v50, a1->m_level)); v74 = *(float *)&v49; v51 = (cocos2d::CCString *)sub_1007AB580("%i/%i", (char)v63); CString = cocos2d::CCString::getCString(v51); v53 = strlen(CString); if ( v53 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v45); v54 = v53; if ( v53 >= 0x17 ) { v69 = v47; v57 = 26; if ( (v53 | 7) != 0x17 ) v57 = (v53 | 7) + 1; v55 = (char *)operator new(v57); __p = v55; *(_QWORD *)&__dst[0] = v57 + 1; v47 = v69; *(_QWORD *)&__dst[1] = v54; } else { LOBYTE(__dst[0]) = 2 * v53; v55 = (char *)__dst + 1; if ( !v53 ) { BYTE1(__dst[0]) = 0; if ( (LOBYTE(__dst[0]) & 1) != 0 ) { LABEL_15: v56 = (const char *)__p; LABEL_21: v58 = cocos2d::CCLabelBMFont::create_3(v56, "bigFont.fnt"); ((void (__fastcall *)(LevelInfoLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v58); sub_10028CBE0((float *)&v73, 1.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v58->setAnchorPoint)(v58, &v73); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v58->setScale)(v58, 0.34999999); LODWORD(v69) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v58->getContentSize)(v58); v59 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v58->getScale)(v58); sub_10028CBE0( (float *)&v65, (float)((float)(*(float *)&v69 * v59) * 0.5) + 2.0, (float)(4 * (a1->m_level->m_stars.random - a1->m_level->m_stars.seed != 10) - 4) + -44.5); sub_10028CCE0((double *)&v73, p_m_basePosition, &v65); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v47->setPosition)(v47, &v73); v60 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v47->getPosition)(v47); sub_10028CBE0((float *)&v65, -8.0, 0.0); sub_10028CCE0((double *)&v73, v60, &v65); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v58->setPosition)(v58, &v73); if ( LODWORD(v75) == LODWORD(v74) ) { BYTE2(v73) = -1; LOWORD(v73) = -156; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v58->setColor)(v58, &v73); } if ( (LOBYTE(__dst[0]) & 1) != 0 ) operator delete(__p); goto LABEL_25; } LABEL_20: v56 = (char *)__dst + 1; goto LABEL_21; } } memmove(v55, CString, v54); v55[v54] = 0; if ( (LOBYTE(__dst[0]) & 1) != 0 ) goto LABEL_15; goto LABEL_20; } } LABEL_25: if ( a1->m_challenge ) { if ( (unsigned int)sub_100720070(a1->m_icons) ) { v61 = 0; do { v62 = sub_1007200C0(a1->m_icons, v61); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v62 + 328LL))(v62, 0); ++v61; } while ( v61 < (unsigned int)sub_100720070(a1->m_icons) ); } ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_orbsIcon->setVisible)(a1->m_orbsIcon, 0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_orbsLabel->setVisible)(a1->m_orbsLabel, 0); } LevelInfoLayer::updateLabelValues(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source