// // DemonInfoPopup::init from 0x4c82f8 to 0x4c888c (1428 bytes) // // 1 xrefs: // > DemonInfoPopup::create @ 0x4c8944 // // 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 DemonInfoPopup::init( DemonInfoPopup *a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13) { cocos2d::CCDirector *v15; // r0 cocos2d::CCNode *v16; // r7 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r6 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCMenu *v19; // r0 cocos2d::CCString *v20; // r0 cocos2d::CCLabelBMFont *v21; // r6 cocos2d::CCString *v22; // r0 cocos2d::CCLabelBMFont *v23; // r7 void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2 cocos2d::CCArray *v25; // r0 int v26; // r7 cocos2d::CCArray *v27; // r6 unsigned int v28; // r6 unsigned int v29; // r5 cocos2d::CCString *v30; // r0 char *CString; // r0 cocos2d::CCSprite *v32; // r9 cocos2d::CCLabelBMFont *v33; // r5 void (__fastcall *v34)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCLabelBMFont *v35; // r6 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v37; // r11 void (__fastcall *v38)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2 const char *v39; // r1 cocos2d::CCString *v40; // r0 cocos2d::CCLabelBMFont *v41; // r7 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCString *v43; // r0 cocos2d::CCLabelBMFont *v44; // r7 void (__fastcall *v45)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9 ButtonSprite *v46; // r0 CCMenuItemSpriteExtra *v47; // r5 cocos2d::CCMenu *m_buttonMenu; // r9 void (__fastcall *v49)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 float v51; // r2 float v52; // r3 bool v53; // [sp+0h] [bp-6Ch] int v54; // [sp+Ch] [bp-60h] cocos2d::CCSize v57; // [sp+2Ch] [bp-40h] BYREF cocos2d::CCPoint v58; // [sp+34h] [bp-38h] BYREF cocos2d::CCPoint v59; // [sp+3Ch] [bp-30h] BYREF cocos2d::CCPoint v60; // [sp+44h] [bp-28h] BYREF cocos2d::CCPoint v61; // [sp+4Ch] [bp-20h] BYREF cocos2d::CCRect v62; // [sp+54h] [bp-18h] BYREF cocos2d::CCSize v63; // 0:^0.8 cocos2d::CCRect v64; // 0:kr00_16.16 v54 = FLAlertLayer::init(a1, (cocos2d::_ccColor4B)75); if ( v54 ) { v15 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v57, v15); cocos2d::CCRect::CCRect(&v62, 0.0, 0.0, 80.0, 80.0); v64.origin.x = v51; v64.origin.y = v52; v64.size = v63; v16 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square02.png", (const char *)&v62, v64); setContentSize = v16->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v62, 380.0, 210.0); setContentSize(v16, (const cocos2d::CCSize *)&v62); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v16, -1); setPosition = v16->setPosition; cocos2d::CCPoint::CCPoint(&v62.origin, v57.width * 0.5, v57.height * 0.5); setPosition(v16, &v62.origin); v19 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v19; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v19, 10); GameToolbox::pointsToString((GameToolbox *)&v62, a2 + a3 + a4 + a5 + a6); v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Classic: %s", (const char *)LODWORD(v62.origin.x)); cocos2d::CCString::getCString(v20); v21 = cocos2d::CCLabelBMFont::create(); sub_774008(&v62); a1->m_mainLayer->addChild(a1->m_mainLayer, v21); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v21->setScale)(v21, 1060320051); GameToolbox::pointsToString((GameToolbox *)&v62, a7 + a8 + a9 + a10 + a11); v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Platformer: %s", (const char *)LODWORD(v62.origin.x)); cocos2d::CCString::getCString(v22); v23 = cocos2d::CCLabelBMFont::create(); sub_774008(&v62); a1->m_mainLayer->addChild(a1->m_mainLayer, v23); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v23->setScale)(v23, 1060320051); setColor = v23->setColor; LOWORD(v62.origin.x) = -14081; BYTE2(v62.origin.x) = -1; setColor(v23, (const cocos2d::ccColor3B *)&v62); v25 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)v21, v23, 0); v26 = 0; v27 = v25; cocos2d::CCPoint::CCPoint(&v62.origin, v57.width * 0.5, (float)((float)(v57.height * 0.5) + 105.0) - 20.0); GameToolbox::alignItemsHorisontally(v27, 30.0, (cocos2d::CCPoint)(unsigned int)&v62, v53); cocos2d::CCPoint::CCPoint(&v58, (float)(v57.width * 0.5) - 140.0, (float)(v57.height * 0.5) + 35.0); do { cocos2d::CCPoint::CCPoint(&v62.origin, (float)v26 * 70.0, 0.0); cocos2d::CCPoint::operator+(&v60, &v58, &v62); switch ( v26 ) { case 1: v28 = a8; v29 = a3; v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", byte_8); break; case 2: v28 = a9; v29 = a4; v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", &byte_6); break; case 3: v28 = a10; v29 = a5; v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", byte_9); break; case 4: v28 = a11; v29 = a6; v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", &byte_9[1]); break; default: v28 = a7; v29 = a2; v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", &byte_7); break; } CString = (char *)cocos2d::CCString::getCString(v30); sub_776584((int)&v59, CString); v32 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)LODWORD(v59.x)); ((void (__fastcall *)(cocos2d::CCSprite *, int))v32->setScale)(v32, 1065353216); v32->setPosition(v32, &v60); a1->m_mainLayer->addChild(a1->m_mainLayer, v32); GameToolbox::pointsToString((GameToolbox *)&v61, v29); v33 = cocos2d::CCLabelBMFont::create(); sub_774008(&v61); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v33->setScale)(v33, 1058642330); a1->m_mainLayer->addChild(a1->m_mainLayer, v33); v34 = v33->setPosition; cocos2d::CCPoint::CCPoint(&v61, 0.0, -50.0); cocos2d::CCPoint::operator+(&v62, &v60, &v61); v34(v33, &v62.origin); GameToolbox::pointsToString((GameToolbox *)&v62, v28); v35 = cocos2d::CCLabelBMFont::create(); sub_774008(&v62); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v35->setScale)(v35, 1058642330); a1->m_mainLayer->addChild(a1->m_mainLayer, v35); v36 = v35->setPosition; v37 = (int)v33->getPosition(v33); cocos2d::CCPoint::CCPoint(&v61, 0.0, -26.0); cocos2d::CCPoint::operator+(&v62, v37, &v61); v36(v35, &v62.origin); v38 = v35->setColor; LOWORD(v62.origin.x) = -14081; BYTE2(v62.origin.x) = -1; v38(v35, (const cocos2d::ccColor3B *)&v62); ++v26; sub_774008(&v59); } while ( v26 != 5 ); cocos2d::CCPoint::CCPoint( &v59, (float)((float)(v57.width * 0.5) + 190.0) - 12.0, (float)((float)(v57.height * 0.5) - 105.0) + 14.0); if ( a13 > 0 ) { GameToolbox::pointsToString((GameToolbox *)&v62, a13); v40 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Gauntlet: %s", (const char *)LODWORD(v62.origin.x)); cocos2d::CCString::getCString(v40); v41 = cocos2d::CCLabelBMFont::create(); sub_774008(&v62); a1->m_mainLayer->addChild(a1->m_mainLayer, v41); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v41->setScale)(v41, 1053609165); setAnchorPoint = v41->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v62.origin, 1.0, 0.0); setAnchorPoint(v41, &v62.origin); v41->setPosition(v41, &v59); v59.y = v59.y + 16.0; } if ( a12 > 0 ) { GameToolbox::pointsToString((GameToolbox *)&v62, a12); v43 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Weekly: %s", (const char *)LODWORD(v62.origin.x)); cocos2d::CCString::getCString(v43); v44 = cocos2d::CCLabelBMFont::create(); sub_774008(&v62); a1->m_mainLayer->addChild(a1->m_mainLayer, v44); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v44->setScale)(v44, 1053609165); v45 = v44->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v62.origin, 1.0, 0.0); v45(v44, &v62.origin); v44->setPosition(v44, &v59); } v46 = ButtonSprite::create((ButtonSprite *)"OK", v39); LODWORD(v62.origin.x) = DemonInfoPopup::onClose; v62.origin.y = 0.0; v47 = CCMenuItemSpriteExtra::create( v46, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(DemonInfoPopup::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v47); m_buttonMenu = a1->m_buttonMenu; v49 = v47->setPosition; cocos2d::CCPoint::CCPoint(&v60, v57.width * 0.5, (float)((float)(v57.height * 0.5) - 105.0) + 25.0); cocos2d::CCNode::convertToNodeSpace(&v61, m_buttonMenu, &v60); v49(v47, &v61); } return v54; }
GD Web Decomp Icon

GD Web Decomp

Raw Source