// // StarInfoPopup::init from 0x4c8978 to 0x4c8e96 (1310 bytes) // // 1 xrefs: // > StarInfoPopup::create @ 0x4c8f56 // // 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 StarInfoPopup::init( StarInfoPopup *a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, bool a11) { cocos2d::CCDirector *v14; // r0 cocos2d::CCNode *v15; // r6 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCMenu *v18; // r0 char *v19; // r1 const char *v20; // r6 cocos2d::CCString *v21; // r0 cocos2d::CCLabelBMFont *v22; // r5 void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 float v24; // s15 int i; // r6 unsigned int v26; // r7 int v27; // r0 GJDifficultySprite *v28; // r8 cocos2d::CCLabelBMFont *v29; // r8 const char *v30; // r1 cocos2d::CCString *v31; // r0 cocos2d::CCLabelBMFont *v32; // r6 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCString *v34; // r0 cocos2d::CCLabelBMFont *v35; // r6 void (__fastcall *v36)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCString *v37; // r0 cocos2d::CCLabelBMFont *v38; // r6 void (__fastcall *v39)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r11 ButtonSprite *v40; // r0 CCMenuItemSpriteExtra *v41; // r5 cocos2d::CCMenu *m_buttonMenu; // r4 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 float v45; // r2 float v46; // r3 int v47; // [sp+Ch] [bp-68h] void (__fastcall *v48)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+10h] [bp-64h] const char *v50; // [sp+24h] [bp-50h] BYREF int v51; // [sp+28h] [bp-4Ch] BYREF cocos2d::CCLabelBMFont *v52; // [sp+2Ch] [bp-48h] BYREF char *v53; // [sp+30h] [bp-44h] BYREF cocos2d::CCSize v54; // [sp+34h] [bp-40h] BYREF cocos2d::CCPoint v55; // [sp+3Ch] [bp-38h] BYREF cocos2d::CCPoint v56; // [sp+44h] [bp-30h] BYREF cocos2d::CCPoint v57; // [sp+4Ch] [bp-28h] BYREF cocos2d::CCPoint v58; // [sp+54h] [bp-20h] BYREF cocos2d::CCRect v59; // [sp+5Ch] [bp-18h] BYREF cocos2d::CCSize v60; // 0:^0.8 cocos2d::CCRect v61; // 0:kr00_16.16 v47 = FLAlertLayer::init(a1, (cocos2d::_ccColor4B)75); if ( v47 ) { v14 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v54, v14); cocos2d::CCRect::CCRect(&v59, 0.0, 0.0, 80.0, 80.0); v61.origin.x = v45; v61.origin.y = v46; v61.size = v60; v15 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square02.png", (const char *)&v59, v61); setContentSize = v15->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v59, 380.0, 210.0); setContentSize(v15, (const cocos2d::CCSize *)&v59); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v15, -1); setPosition = v15->setPosition; cocos2d::CCPoint::CCPoint(&v59.origin, v54.width * 0.5, v54.height * 0.5); setPosition(v15, &v59.origin); v18 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v18; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v18, 10); if ( a11 ) v19 = "Platformer"; else v19 = "Classic"; sub_776584((int)&v50, v19); v20 = v50; GameToolbox::pointsToString((GameToolbox *)&v51, a3 + a4 + a5 + a6 + a7); v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s: %s", v20, v51); cocos2d::CCString::getCString(v21); v22 = cocos2d::CCLabelBMFont::create(); sub_774008(&v51); a1->m_mainLayer->addChild(a1->m_mainLayer, v22); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v22->setScale)(v22, 1060320051); v23 = v22->setPosition; cocos2d::CCPoint::CCPoint(&v59.origin, v54.width * 0.5, (float)((float)(v54.height * 0.5) + 105.0) - 20.0); v23(v22, &v59.origin); v24 = (float)(v54.width * 0.5) - 147.5; cocos2d::CCPoint::CCPoint(&v55, v24, (float)(v54.height * 0.5) + 25.0); for ( i = 0; i != 6; ++i ) { cocos2d::CCPoint::CCPoint(&v59.origin, (float)i * 59.0, 0.0); cocos2d::CCPoint::operator+(&v57, &v55, &v59); switch ( i ) { case 1: v26 = a3; goto LABEL_22; case 2: v26 = a4; goto LABEL_22; case 3: v26 = a5; goto LABEL_22; case 4: v26 = a6; goto LABEL_22; case 5: v26 = a7; LABEL_22: v27 = i; break; default: v26 = a2; v27 = -1; break; } v28 = GJDifficultySprite::create(v27, Long); ((void (__fastcall *)(GJDifficultySprite *, int))v28->setScale)(v28, 1063675494); v28->setPosition(v28, &v57); a1->m_mainLayer->addChild(a1->m_mainLayer, v28); GameToolbox::pointsToString((GameToolbox *)&v52, v26); v29 = cocos2d::CCLabelBMFont::create(); sub_774008(&v52); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v29->setScale)(v29, 1058642330); a1->m_mainLayer->addChild(a1->m_mainLayer, v29); v48 = v29->setPosition; cocos2d::CCPoint::CCPoint(&v58, 0.0, -40.0); cocos2d::CCPoint::operator+(&v59, &v57, &v58); v48(v29, &v59.origin); } cocos2d::CCPoint::CCPoint( &v56, (float)((float)(v54.width * 0.5) + 190.0) - 12.0, (float)((float)(v54.height * 0.5) - 105.0) + 14.0); if ( a9 > 0 ) { GameToolbox::pointsToString((GameToolbox *)&v53, a9); v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Gauntlet: %s", v53); cocos2d::CCString::getCString(v31); v32 = cocos2d::CCLabelBMFont::create(); sub_774008(&v53); a1->m_mainLayer->addChild(a1->m_mainLayer, v32); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v32->setScale)(v32, 1053609165); setAnchorPoint = v32->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v59.origin, 1.0, 0.0); setAnchorPoint(v32, &v59.origin); v32->setPosition(v32, &v56); v56.y = v56.y + 16.0; } if ( a8 > 0 ) { GameToolbox::pointsToString((GameToolbox *)&v57, a8); v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Daily: %s", (const char *)LODWORD(v57.x)); cocos2d::CCString::getCString(v34); v35 = cocos2d::CCLabelBMFont::create(); sub_774008(&v57); a1->m_mainLayer->addChild(a1->m_mainLayer, v35); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v35->setScale)(v35, 1053609165); v36 = v35->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v59.origin, 1.0, 0.0); v36(v35, &v59.origin); v35->setPosition(v35, &v56); v56.y = v56.y + 16.0; } if ( a10 > 0 ) { GameToolbox::pointsToString((GameToolbox *)&v58, a10); v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Map: %s", (const char *)LODWORD(v58.x)); cocos2d::CCString::getCString(v37); v38 = cocos2d::CCLabelBMFont::create(); sub_774008(&v58); a1->m_mainLayer->addChild(a1->m_mainLayer, v38); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v38->setScale)(v38, 1053609165); v39 = v38->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v59.origin, 1.0, 0.0); v39(v38, &v59.origin); v38->setPosition(v38, &v56); v56.y = v56.y + 16.0; } v40 = ButtonSprite::create((ButtonSprite *)"OK", v30); v59.origin.y = 0.0; LODWORD(v59.origin.x) = StarInfoPopup::onClose; v41 = CCMenuItemSpriteExtra::create( v40, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(StarInfoPopup::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v41); m_buttonMenu = a1->m_buttonMenu; v43 = v41->setPosition; cocos2d::CCPoint::CCPoint(&v57, v54.width * 0.5, (float)((float)(v54.height * 0.5) - 105.0) + 25.0); cocos2d::CCNode::convertToNodeSpace(&v58, m_buttonMenu, &v57); v43(v41, &v58); sub_774008(&v50); } return v47; }
GD Web Decomp Icon

GD Web Decomp

Raw Source