// // StarInfoPopup::init from 0x1007c1fb0 to 0x1007c27ed (2109 bytes) // // 1 xrefs: // > StarInfoPopup::create @ 0x1007c1f61 // // 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 // bool __fastcall StarInfoPopup::init( StarInfoPopup *a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, bool a11) { __int64 v11; // rbx __int64 v12; // r14 __int64 v13; // r15 __int64 v14; // r12 bool result; // al cocos2d::extension::CCScale9Sprite *v17; // rbx double v18; // xmm0_8 cocos2d::CCMenu *v19; // rax const char *v20; // rsi size_t v21; // rdx const char *v22; // rdx char *v23; // rax const char *CString; // rax cocos2d::CCLabelBMFont *v25; // rbx GJDifficultySprite *v26; // rbx double v27; // xmm0_8 const char *v28; // rdi cocos2d::CCLabelBMFont *v29; // rbx int i; // r15d int v31; // r14d int v32; // eax GJDifficultySprite *v33; // rbx double v34; // xmm0_8 const char *v35; // rdi cocos2d::CCLabelBMFont *v36; // r14 double v37; // xmm0_8 bool v38; // r15 const char *v39; // rsi char *v40; // rax const char *v41; // rax cocos2d::CCLabelBMFont *v42; // rbx const char *v43; // rsi char *v44; // rax const char *v45; // rax cocos2d::CCLabelBMFont *v46; // rbx const char *v47; // rsi char *v48; // rax const char *v49; // rax cocos2d::CCLabelBMFont *v50; // rbx ButtonSprite *v51; // rax CCMenuItemSpriteExtra *v52; // rbx cocos2d::CCMenu *m_buttonMenu; // r14 unsigned __int64 v54; // [rsp+0h] [rbp-A0h] BYREF __int64 v55; // [rsp+8h] [rbp-98h] __int64 v56; // [rsp+10h] [rbp-90h] __int64 v57; // [rsp+18h] [rbp-88h] float v58[4]; // [rsp+20h] [rbp-80h] BYREF void *v59; // [rsp+30h] [rbp-70h] __int64 v60; // [rsp+38h] [rbp-68h] unsigned __int64 v61; // [rsp+44h] [rbp-5Ch] BYREF float v62; // [rsp+4Ch] [rbp-54h] BYREF float v63; // [rsp+50h] [rbp-50h] bool v64; // [rsp+57h] [rbp-49h] unsigned __int64 v65; // [rsp+58h] [rbp-48h] BYREF unsigned __int64 v66[2]; // [rsp+60h] [rbp-40h] BYREF void *__p; // [rsp+70h] [rbp-30h] double v68; // 0:xmm0_8.8 cocos2d::CCRect v69; // 0:xmm0_8.8,8:xmm1_8.8 v11 = (unsigned int)a6; v12 = (unsigned int)a5; v13 = (unsigned int)a4; v14 = (unsigned int)a3; LODWORD(v60) = a2; result = FLAlertLayer::init_1(a1, 75); if ( result ) { v64 = result; v55 = v11; v56 = v12; v57 = v13; cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v62); v69.origin = 0; v69.size = 0; sub_10028CC00((__int64)v58, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u); v17 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square02.png", v69); sub_10028CBF0(v58, 380.0, 210.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v17->setContentSize)(v17, v58); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v17, 0xFFFFFFFFLL); *(_QWORD *)&v18 = LODWORD(v62); *(float *)&v18 = v62 * 0.5; sub_10028CBE0(v58, v62 * 0.5, v63 * 0.5); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v17->setPosition)(v17, v58); v19 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v19; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v19, 10); v20 = "Classic"; if ( a11 ) v20 = "Platformer"; v21 = 3LL * a11 + 7; LOBYTE(v58[0]) = 2 * v21; memcpy((char *)v58 + 1, v20, v21); *((_BYTE *)&v58[2] + 3 * a11) = 0; GameToolbox::pointsToString(v66, a7 + v14 + v57 + v56 + v55, v18); if ( (v66[0] & 1) != 0 ) v22 = (const char *)__p; else v22 = (char *)v66 + 1; v23 = sub_1007AB580("%s: %s", (const char *)v58 + 1, v22); CString = cocos2d::CCString::getCString((cocos2d::CCString *)v23); v25 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt"); if ( (v66[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v25); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v25->setScale)(v25, 0.69999999); sub_10028CBE0((float *)v66, v62 * 0.5, (float)((float)(v63 * 0.5) + 105.0) + -20.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v25->setPosition)(v25, v66); sub_10028CBE0((float *)&v54, (float)(v62 * 0.5) + -147.5, (float)(v63 * 0.5) + 25.0); sub_10028CBE0((float *)v66, 0.0, 0.0); sub_10028CCE0((double *)&v65, &v54, v66); v26 = GJDifficultySprite::create(-1, Long); ((void (__fastcall *)(GJDifficultySprite *, float))v26->setScale)(v26, 0.89999998); ((void (__fastcall *)(GJDifficultySprite *, unsigned __int64 *))v26->setPosition)(v26, &v65); v27 = ((double (__fastcall *)(cocos2d::CCLayer *, GJDifficultySprite *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v26); GameToolbox::pointsToString(v66, v60, v27); v28 = (char *)v66 + 1; if ( (v66[0] & 1) != 0 ) v28 = (const char *)__p; v29 = cocos2d::CCLabelBMFont::create_3(v28, "goldFont.fnt"); if ( (v66[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v29->setScale)(v29, 0.60000002); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v29); v60 = v14; sub_10028CBE0((float *)&v61, 0.0, -40.0); sub_10028CCE0((double *)v66, &v65, &v61); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v29->setPosition)(v29, v66); for ( i = 1; i != 6; ++i ) { sub_10028CBE0((float *)v66, (float)i * 59.0, 0.0); sub_10028CCE0((double *)&v65, &v54, v66); v31 = v60; switch ( i ) { case 1: break; case 2: v32 = v57; goto LABEL_19; case 3: v32 = v56; goto LABEL_19; case 4: v32 = v55; LABEL_19: v31 = v32; break; case 5: v31 = a7; break; } v33 = GJDifficultySprite::create(i, Long); ((void (__fastcall *)(GJDifficultySprite *, float))v33->setScale)(v33, 0.89999998); ((void (__fastcall *)(GJDifficultySprite *, unsigned __int64 *))v33->setPosition)(v33, &v65); v34 = ((double (__fastcall *)(cocos2d::CCLayer *, GJDifficultySprite *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v33); GameToolbox::pointsToString(v66, v31, v34); v35 = (char *)v66 + 1; if ( (v66[0] & 1) != 0 ) v35 = (const char *)__p; v36 = cocos2d::CCLabelBMFont::create_3(v35, "goldFont.fnt"); if ( (v66[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v36->setScale)(v36, 0.60000002); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v36); sub_10028CBE0((float *)&v61, 0.0, -40.0); sub_10028CCE0((double *)v66, &v65, &v61); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v36->setPosition)(v36, v66); } *(_QWORD *)&v37 = LODWORD(v62); *(float *)&v37 = (float)((float)(v62 * 0.5) + 190.0) + -12.0; sub_10028CBE0((float *)&v65, *(float *)&v37, (float)((float)(v63 * 0.5) + -105.0) + 14.0); v38 = v64; if ( a9 > 0 ) { GameToolbox::pointsToString(v66, a9, v37); if ( (v66[0] & 1) != 0 ) v39 = (const char *)__p; else v39 = (char *)v66 + 1; v40 = sub_1007AB580("Gauntlet: %s", v39); v41 = cocos2d::CCString::getCString((cocos2d::CCString *)v40); v42 = cocos2d::CCLabelBMFont::create_3(v41, "goldFont.fnt"); if ( (v66[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v42); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v42->setScale)(v42, 0.40000001); sub_10028CBE0((float *)v66, 1.0, 0.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v42->setAnchorPoint)(v42, v66); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v42->setPosition)(v42, &v65); *(_QWORD *)&v37 = HIDWORD(v65); *(float *)&v37 = *((float *)&v65 + 1) + 16.0; *((float *)&v65 + 1) = *((float *)&v65 + 1) + 16.0; } if ( a8 > 0 ) { GameToolbox::pointsToString(v66, a8, v37); if ( (v66[0] & 1) != 0 ) v43 = (const char *)__p; else v43 = (char *)v66 + 1; v44 = sub_1007AB580("Daily: %s", v43); v45 = cocos2d::CCString::getCString((cocos2d::CCString *)v44); v46 = cocos2d::CCLabelBMFont::create_3(v45, "goldFont.fnt"); if ( (v66[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v46); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v46->setScale)(v46, 0.40000001); sub_10028CBE0((float *)v66, 1.0, 0.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v46->setAnchorPoint)(v46, v66); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v46->setPosition)(v46, &v65); *(_QWORD *)&v37 = HIDWORD(v65); *(float *)&v37 = *((float *)&v65 + 1) + 16.0; *((float *)&v65 + 1) = *((float *)&v65 + 1) + 16.0; } if ( a10 > 0 ) { GameToolbox::pointsToString(v66, a10, v37); if ( (v66[0] & 1) != 0 ) v47 = (const char *)__p; else v47 = (char *)v66 + 1; v48 = sub_1007AB580("Map: %s", v47); v49 = cocos2d::CCString::getCString((cocos2d::CCString *)v48); v50 = cocos2d::CCLabelBMFont::create_3(v49, "goldFont.fnt"); if ( (v66[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v50); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v50->setScale)(v50, 0.40000001); sub_10028CBE0((float *)v66, 1.0, 0.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v50->setAnchorPoint)(v50, v66); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v50->setPosition)(v50, &v65); *((float *)&v65 + 1) = *((float *)&v65 + 1) + 16.0; } v51 = sub_100092A30("OK"); v52 = CCMenuItemSpriteExtra::create( v51, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)StarInfoPopup::onClose); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v52); m_buttonMenu = a1->m_buttonMenu; sub_10028CBE0((float *)&v61, v62 * 0.5, (float)((float)(0.5 * v63) + -105.0) + 25.0); *(cocos2d::CCPoint *)&v68 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v66, (const cocos2d::CCPoint *)m_buttonMenu); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v52->setPosition)(v52, v66, v68); if ( (LOBYTE(v58[0]) & 1) != 0 ) operator delete(v59); return v38; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source