// // SetupPortalPopup::init from 0x10056f810 to 0x1005700f5 (2277 bytes) // // 1 xrefs: // > SetupPortalPopup::create @ 0x10056f7cd // // 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 SetupPortalPopup::init(SetupPortalPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { bool result; // al cocos2d::CCObject *v6; // rdi cocos2d::CCArray *v7; // rax cocos2d::CCArray *v8; // rdi cocos2d::CCArray *v9; // rax cocos2d::extension::CCScale9Sprite *v10; // r14 cocos2d::CCLabelBMFont *v11; // r15 cocos2d::CCMenu *v12; // rax ButtonSprite *v13; // rax CCMenuItemSpriteExtra *v14; // rax cocos2d::CCMenu *m_buttonMenu; // r15 __int64 v16; // r15 cocos2d::CCMenu *v17; // r12 bool m_freeMode; // r14 cocos2d::CCMenu *v19; // r15 cocos2d::CCLayer *m_mainLayer; // r13 bool m_cameraSettingsEnabled; // r14 cocos2d::CCMenu *v22; // r15 cocos2d::CCLayer *v23; // r13 cocos2d::CCLabelBMFont *v24; // rax cocos2d::CCLabelBMFont *m_cameraEasingLabel; // r14 Slider *v26; // rax Slider *m_cameraEasingSlider; // r13 unsigned __int64 *v28; // r14 SliderThumb *Thumb; // rax cocos2d::CCLabelBMFont *v30; // r14 cocos2d::CCString *v31; // rax const char *CString; // rax cocos2d::CCLabelBMFont *v33; // rax cocos2d::CCLabelBMFont *m_cameraPaddingLabel; // r14 unsigned __int64 *v35; // r15 Slider *v36; // rax Slider *m_cameraPaddingSlider; // r14 unsigned __int64 *v38; // r15 SliderThumb *v39; // rax cocos2d::CCLabelBMFont *v40; // r14 double m_cameraPadding; // xmm0_8 cocos2d::CCString *v42; // rax const char *v43; // rax char v44; // [rsp+0h] [rbp-F0h] char v45; // [rsp+0h] [rbp-F0h] void *v46[3]; // [rsp+38h] [rbp-B8h] BYREF char v47; // [rsp+50h] [rbp-A0h] BYREF char v48[15]; // [rsp+51h] [rbp-9Fh] BYREF void *v49; // [rsp+60h] [rbp-90h] BYREF char v50; // [rsp+68h] [rbp-88h] BYREF _BYTE v51[23]; // [rsp+69h] [rbp-87h] BYREF void *v52[3]; // [rsp+80h] [rbp-70h] BYREF void **v53; // [rsp+98h] [rbp-58h] unsigned __int64 v54; // [rsp+A4h] [rbp-4Ch] BYREF unsigned __int64 v55[2]; // [rsp+ACh] [rbp-44h] BYREF float v56; // [rsp+BCh] [rbp-34h] BYREF float v57; // [rsp+C0h] [rbp-30h] bool v58; // [rsp+C7h] [rbp-29h] double v59; // 0:xmm0_8.8 cocos2d::CCRect v60; // 0:xmm0_8.8,8:xmm1_8.8 result = FLAlertLayer::init_1(a1, 200); if ( result ) { v58 = result; if ( a2 ) { a1->m_gameObjects = (cocos2d::CCArray *)a2; v6 = a2; } else { a1->m_gameObject = (EffectGameObject *)a3; v6 = a3; } cocos2d::CCObject::retain(v6); a1->m_noElasticity = 1; a1->m_disableDelegate = 1; v7 = (cocos2d::CCArray *)sub_10071F9E0(v6, 200); a1->m_freeModeObjects = v7; v8 = v7; cocos2d::CCObject::retain(v7); v9 = (cocos2d::CCArray *)sub_10071F9E0(v8, 200); a1->m_cameraSettingsObjects = v9; cocos2d::CCObject::retain(v9); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v56); v60.origin = 0; v60.size = 0; sub_10028CC00((__int64)v55, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u); v10 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", v60); sub_10028CBF0((float *)v55, 430.0, 310.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v10->setContentSize)(v10, v55); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v10, 0xFFFFFFFFLL); sub_10028CBE0((float *)v55, v56 * 0.5, v57 * 0.5); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v10->setPosition)(v10, v55); v11 = cocos2d::CCLabelBMFont::create_3("Setup Portal", "bigFont.fnt"); sub_10028CBE0((float *)v55, v56 * 0.5, (float)((float)(v57 * 0.5) + 155.0) + -15.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v11->setPosition)(v11, v55); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v11); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v11->setScale)(v11, 0.60000002); v12 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v12; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v12, 10); a1->m_joystickConnected = -1; v13 = sub_100092A30("OK"); v14 = CCMenuItemSpriteExtra::create( v13, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)SetupPortalPopup::onClose); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v14); m_buttonMenu = a1->m_buttonMenu; sub_10028CBE0((float *)v55, v56 * 0.5, (float)((float)(v57 * 0.5) + -155.0) + 25.0); ((void (__fastcall *)(cocos2d::CCMenu *, unsigned __int64 *))m_buttonMenu->setPosition)(m_buttonMenu, v55); v50 = 22; strcpy(v51, "Portal Help"); strcpy((char *)v46, "\"No time for help."); v16 = InfoAlertButton::create(&v50, v46, 1.0); if ( ((__int64)v46[0] & 1) != 0 ) operator delete(v46[2]); if ( (v50 & 1) != 0 ) operator delete(*(void **)&v51[15]); v53 = &v49; ((void (__fastcall *)(cocos2d::CCMenu *, __int64))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v16); v17 = a1->m_buttonMenu; sub_10028CBE0( (float *)&v54, (float)((float)(v56 * 0.5) + 215.0) + -18.0, (float)((float)(v57 * 0.5) + 155.0) + -18.0); *(cocos2d::CCPoint *)&v59 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v55, (const cocos2d::CCPoint *)v17); (*(void (__fastcall **)(__int64, unsigned __int64 *, double))(*(_QWORD *)v16 + 184LL))(v16, v55, v59); SetupPortalPopup::determineStartValues(a1); v47 = 18; strcpy(v48, "Free Mode"); m_freeMode = a1->m_freeMode; v19 = a1->m_buttonMenu; sub_10028CBE0( (float *)v55, (float)((float)(v56 * 0.5) + -215.0) + 20.0, (float)((float)(v57 * 0.5) + 155.0) + -20.0); m_mainLayer = a1->m_mainLayer; sub_10028CBE0((float *)&v54, 8.0, 0.0); GameToolbox::createToggleButton( (__int64)&v47, (unsigned __int64)SetupPortalPopup::onUnboundMode, 0, m_freeMode, (const cocos2d::CCPoint *)v19, v55, 0.80000001, 0.44999999, 0.0, a1, m_mainLayer, (float *)&v54, "bigFont.fnt", 0, 0, 0); if ( (v47 & 1) != 0 ) operator delete(v49); v53 = &v52[2]; strcpy((char *)v52, "(Edit Camera\nSettings"); m_cameraSettingsEnabled = a1->m_cameraSettingsEnabled; v22 = a1->m_buttonMenu; sub_10028CBE0( (float *)v55, (float)((float)(v56 * 0.5) + -215.0) + 20.0, (float)((float)(v57 * 0.5) + 155.0) + -60.0); v23 = a1->m_mainLayer; sub_10028CBE0((float *)&v54, 8.0, 0.0); GameToolbox::createToggleButton( (__int64)v52, (unsigned __int64)SetupPortalPopup::onEditCameraSettings, 0, m_cameraSettingsEnabled, (const cocos2d::CCPoint *)v22, v55, 0.80000001, 0.44999999, 0.0, a1, v23, (float *)&v54, "bigFont.fnt", 0, 0, (__int64)a1->m_freeModeObjects); if ( ((__int64)v52[0] & 1) != 0 ) operator delete(v52[2]); v24 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt"); a1->m_cameraEasingLabel = v24; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v24); m_cameraEasingLabel = a1->m_cameraEasingLabel; sub_10028CBE0((float *)v55, v56 * 0.5, 0.5 * v57); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))m_cameraEasingLabel->setPosition)( m_cameraEasingLabel, v55); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_cameraEasingLabel->setScale)( a1->m_cameraEasingLabel, 0.80000001); sub_10071FCD0(a1->m_cameraSettingsObjects, a1->m_cameraEasingLabel); v26 = Slider::create_2(a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)SetupPortalPopup::sliderChanged); a1->m_cameraEasingSlider = v26; ((void (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v26); m_cameraEasingSlider = a1->m_cameraEasingSlider; v28 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_cameraEasingLabel->getPosition)(a1->m_cameraEasingLabel); sub_10028CBE0((float *)&v54, 0.0, -30.0); sub_10028CCE0((double *)v55, v28, &v54); ((void (__fastcall *)(Slider *, unsigned __int64 *))m_cameraEasingSlider->setPosition)(m_cameraEasingSlider, v55); Thumb = Slider::getThumb(a1->m_cameraEasingSlider); ((void (__fastcall *)(SliderThumb *, _QWORD))Thumb->setTag)(Thumb, 0); sub_10071FCD0(a1->m_cameraSettingsObjects, a1->m_cameraEasingSlider); v30 = a1->m_cameraEasingLabel; v31 = (cocos2d::CCString *)sub_1007AB580("Easing: %i", v44); CString = cocos2d::CCString::getCString(v31); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v30->setString)(v30, CString); Slider::setValue(a1->m_cameraEasingSlider, (float)((float)a1->m_cameraEasing + -1.0) / 39.0); v33 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt"); a1->m_cameraPaddingLabel = v33; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v33); m_cameraPaddingLabel = a1->m_cameraPaddingLabel; v35 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_cameraEasingLabel->getPosition)(a1->m_cameraEasingLabel); sub_10028CBE0((float *)&v54, 0.0, -50.0); sub_10028CCE0((double *)v55, v35, &v54); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))m_cameraPaddingLabel->setPosition)( m_cameraPaddingLabel, v55); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_cameraPaddingLabel->setScale)( a1->m_cameraPaddingLabel, 0.80000001); sub_10071FCD0(a1->m_cameraSettingsObjects, a1->m_cameraPaddingLabel); v36 = Slider::create_2(a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)SetupPortalPopup::sliderChanged); a1->m_cameraPaddingSlider = v36; ((void (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v36); m_cameraPaddingSlider = a1->m_cameraPaddingSlider; v38 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_cameraPaddingLabel->getPosition)(a1->m_cameraPaddingLabel); sub_10028CBE0((float *)&v54, 0.0, -30.0); sub_10028CCE0((double *)v55, v38, &v54); ((void (__fastcall *)(Slider *, unsigned __int64 *))m_cameraPaddingSlider->setPosition)(m_cameraPaddingSlider, v55); v39 = Slider::getThumb(a1->m_cameraPaddingSlider); ((void (__fastcall *)(SliderThumb *, __int64))v39->setTag)(v39, 1); sub_10071FCD0(a1->m_cameraSettingsObjects, a1->m_cameraPaddingSlider); v40 = a1->m_cameraPaddingLabel; m_cameraPadding = a1->m_cameraPadding; v42 = (cocos2d::CCString *)sub_1007AB580("Padding: %.01f", v45); v43 = cocos2d::CCString::getCString(v42); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *, double))v40->setString)(v40, v43, m_cameraPadding); Slider::setValue(a1->m_cameraPaddingSlider, a1->m_cameraPadding); SetupPortalPopup::updateItemVisibility(a1); a1->m_disableDelegate = 0; return v58; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source