// // SetupInstantCountPopup::init from 0x1005e8c60 to 0x1005e983e (3038 bytes) // // 1 xrefs: // > SetupInstantCountPopup::create @ 0x1005e8c1d // // 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 SetupInstantCountPopup::init( SetupInstantCountPopup *a1, CountTriggerGameObject *a2, cocos2d::CCArray *a3) { bool result; // al cocos2d::CCLabelBMFont *v4; // r15 ButtonSprite *v5; // rax CCMenuItemSpriteExtra *v6; // rax char *v7; // r14 SetupInstantCountPopup *v8; // rbx const cocos2d::CCPoint *m_buttonMenu; // r15 unsigned int v10; // r13d __m128 *v11; // r12 double v12; // xmm0_8 char v13; // r14 const char *data; // rdi cocos2d::CCLabelBMFont *v15; // r15 float *v16; // rbx cocos2d::extension::CCScale9Sprite *v17; // r12 CCTextInputNode *v18; // r12 void **p_data; // rax SetupInstantCountPopup *v20; // r14 cocos2d::CCSprite *v21; // r15 CCMenuItemSpriteExtra *v22; // r15 cocos2d::CCSprite *v23; // r15 CCMenuItemSpriteExtra *v24; // r14 __int64 v25; // rax SetupInstantCountPopup *v26; // r14 unsigned __int8 m_activateGroup; // r14 int m_mode; // r14d __int64 m_equalsToggler; // rax SetupInstantCountPopup *v30; // rbx int v31; // r14d __int64 m_largerToggler; // rax SetupInstantCountPopup *v33; // rbx int v34; // r14d __int64 m_smallerToggler; // rax SetupInstantCountPopup *v36; // rbx TextInputDelegate *v37; // [rsp+8h] [rbp-178h] __int128 v38; // [rsp+10h] [rbp-170h] BYREF void *v39; // [rsp+20h] [rbp-160h] std::string v40; // [rsp+28h] [rbp-158h] BYREF std::string v41; // [rsp+40h] [rbp-140h] BYREF std::string v42; // [rsp+58h] [rbp-128h] BYREF unsigned __int64 v43; // [rsp+70h] [rbp-110h] BYREF __int128 v44; // [rsp+78h] [rbp-108h] BYREF void *v45; // [rsp+88h] [rbp-F8h] __int128 v46; // [rsp+90h] [rbp-F0h] BYREF void *v47; // [rsp+A0h] [rbp-E0h] BYREF __int128 v48; // [rsp+A8h] [rbp-D8h] BYREF void *v49; // [rsp+B8h] [rbp-C8h] __int128 v50; // [rsp+C0h] [rbp-C0h] BYREF void *v51; // [rsp+D0h] [rbp-B0h] double v52; // [rsp+D8h] [rbp-A8h] BYREF unsigned __int64 v53[2]; // [rsp+E0h] [rbp-A0h] BYREF unsigned __int64 v54[2]; // [rsp+F0h] [rbp-90h] BYREF unsigned __int64 v55; // [rsp+100h] [rbp-80h] BYREF void (__fastcall *v56)(SetupInstantCountPopup *, cocos2d::CCObject *); // [rsp+108h] [rbp-78h] unsigned __int64 v57[2]; // [rsp+110h] [rbp-70h] BYREF std::string v58; // [rsp+120h] [rbp-60h] BYREF unsigned __int64 v59; // [rsp+13Ch] [rbp-44h] BYREF float v60; // [rsp+144h] [rbp-3Ch] BYREF float v61; // [rsp+148h] [rbp-38h] bool v62; // [rsp+14Fh] [rbp-31h] SetupInstantCountPopup *v63; // [rsp+150h] [rbp-30h] double v64; // 0:xmm0_8.8 double v65; // 0:xmm0_8.8 cocos2d::CCRect v66; // 0:xmm0_8.8,8:xmm1_8.8 result = SetupTriggerPopup::init(a1, a2, a3, 320.0, 280.0, 1); if ( !result ) return result; v62 = result; ((void (__fastcall *)(SetupInstantCountPopup *))a1->determineStartValues)(a1); cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)&v64 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v60); v4 = cocos2d::CCLabelBMFont::create_3("Instant Count Trigger", "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, double))a1->m_mainLayer->addChild)( a1->m_mainLayer, v4, v64); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v4->setScale)(v4, 0.69999999); sub_10028CBE0((float *)&v58, v60 * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v61 * 0.5)) + -18.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v4->setPosition)(v4, &v58); v5 = ButtonSprite::create_1("OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0); v6 = CCMenuItemSpriteExtra::create(v5, nullptr, a1, (cocos2d::SEL_MenuHandler)0x529uLL); v63 = a1; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v6); LOBYTE(v38) = 8; strcpy((char *)&v38 + 1, "Help"); v40.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x140u); v40.__r_.__value_.__r.__words[0] = 321; v40.__r_.__value_.__l.__size_ = 314; strcpy( v40.__r_.__value_.__l.__data_, "Disables objects using Target ID when an Item ID reaches a certain Target Count. The conditi" "on is only checked once when the trigger is activated.\n" "Equals, Larger, or Smaller specify which condition to use.\n" "Activate Group makes the trigger enable and spawn the group instead."); v7 = InfoAlertButton::create(&v38, &v40, 1.0); if ( (*(_BYTE *)&v40.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v40.__r_.__value_.__l.__data_); if ( (v38 & 1) != 0 ) operator delete(v39); v53[1] = (unsigned __int64)&v47; v8 = v63; ((void (__fastcall *)(cocos2d::CCMenu *, char *))v63->m_buttonMenu->addChild)(v63->m_buttonMenu, v7); m_buttonMenu = (const cocos2d::CCPoint *)v8->m_buttonMenu; sub_10028CBE0( (float *)v57, (float)((float)(v60 * 0.5) - (float)(v8->m_width * 0.5)) + 18.0, (float)((float)(v8->m_height * 0.5) + (float)(v61 * 0.5)) + -18.0); *(cocos2d::CCPoint *)&v65 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v58, m_buttonMenu); (*(void (__fastcall **)(char *, std::string *, double))(*(_QWORD *)v7 + 184LL))(v7, &v58, v65); v8->m_joystickConnected = -1; sub_10028CBE0((float *)&v55, v60 * 0.5, (float)(v61 * 0.5) + 25.0); v37 = &v8->TextInputDelegate; v10 = 0; v11 = (__m128 *)v54; do { *(_WORD *)&v58.__r_.__value_.__l.0 = 0; sub_10028CC30(&v59); if ( !v10 ) { std::string::assign(&v58, "Item ID"); sub_10028CBE0(v11->f32, -70.0, 40.0); sub_10028CCE0((double *)v57, &v55, (unsigned __int64 *)v11); v12 = sub_10028CC90(&v59, (double *)v57); v13 = 0; v56 = SetupInstantCountPopup::onTargetIDArrow; data = v58.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_14; LABEL_13: data = v58.__r_.__value_.__l.__data_; goto LABEL_14; } if ( v10 == 1 ) { std::string::assign(&v58, "Target Count"); sub_10028CBE0(v11->f32, -70.0, -25.0); sub_10028CCE0((double *)v57, &v55, (unsigned __int64 *)v11); v12 = sub_10028CC90(&v59, (double *)v57); v13 = 1; v56 = SetupInstantCountPopup::onTargetCountArrow; data = v58.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_13; } else { std::string::assign(&v58, "Target ID"); sub_10028CBE0(v11->f32, 70.0, 40.0); sub_10028CCE0((double *)v57, &v55, (unsigned __int64 *)v11); v12 = sub_10028CC90(&v59, (double *)v57); v13 = 0; v56 = SetupInstantCountPopup::onTargetID2Arrow; data = v58.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_13; } LABEL_14: v15 = cocos2d::CCLabelBMFont::create_3(data, "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, double))v63->m_mainLayer->addChild)( v63->m_mainLayer, v15, v12); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v15->setScale)(v15, 0.64999998); v16 = (float *)v11; sub_10028CBE0(v11->f32, 0.0, 30.0); sub_10028CCE0((double *)v57, &v59, (unsigned __int64 *)v11); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v15->setPosition)(v15, v57); v66.size = 0; sub_10028CC00((__int64)v57, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v66.origin = sub_10028D180(v11, v57); v17 = cocos2d::extension::CCScale9Sprite::create_2("square02b_small.png", v66); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v17->setOpacity)(v17, 100); BYTE2(v54[0]) = 0; LOWORD(v54[0]) = 0; ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v17->setColor)(v17, v16); sub_10028CBF0(v16, 50.0, 30.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v17->setContentSize)(v17, v16); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))v63->m_mainLayer->addChild_0)( v63->m_mainLayer, v17, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v17->setPosition)(v17, &v59); v18 = CCTextInputNode::create(50.0, 40.0, "Num", "Thonburi", 24, "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, __int64))v63->m_mainLayer->addChild_0)( v63->m_mainLayer, v18, 20); ((void (__fastcall *)(CCTextInputNode *, unsigned __int64 *))v18->setPosition)(v18, &v59); CCTextInputNode::setMaxLabelScale(v18, 0.60000002); CCTextInputNode::setMaxLabelWidth(v18, 200.0); ((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))v18->m_textField->setVisible)(v18->m_textField, 0); v18->m_maxLabelLength = 6; if ( !v13 ) { v42.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)20; strcpy(v42.__r_.__value_.__s.__data_, "0123456789"); CCTextInputNode::setAllowedChars((std::string *)v18, &v42); p_data = (void **)&v42.__r_.__value_.__l.__data_; if ( (*(_BYTE *)&v42.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_19; LABEL_18: operator delete(*p_data); goto LABEL_19; } v41.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)22; strcpy(v41.__r_.__value_.__s.__data_, "0123456789-"); CCTextInputNode::setAllowedChars((std::string *)v18, &v41); p_data = (void **)&v41.__r_.__value_.__l.__data_; if ( (*(_BYTE *)&v41.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_18; LABEL_19: CCTextInputNode::setLabelPlaceholderColor(v18, (cocos2d::ccColor3B)-1004936); CCTextInputNode::setLabelPlaceholderScale(v18, 0.5); v18->m_delegate = v37; v18->m_numberInput = 1; ((void (__fastcall *)(CCTextInputNode *, _QWORD))v18->setTag)(v18, v10); v20 = v63; cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v43, (const cocos2d::CCPoint *)v63->m_buttonMenu); v21 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v21->setScale)(v21, 1.1); v22 = CCMenuItemSpriteExtra::create(v21, nullptr, v20, (cocos2d::SEL_MenuHandler)(unsigned __int64)v56); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v20->m_buttonMenu->addChild)( v20->m_buttonMenu, v22); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v22->setTag)(v22, 1); sub_10028CBE0((float *)v53, -50.0, 0.0); sub_10028CCE0(&v52, &v43, v53); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *))v22->setPosition)(v22, &v52); CCMenuItemSpriteExtra::setSizeMult(v22, 2.0); v23 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v23->setScale)(v23, 1.1); v24 = CCMenuItemSpriteExtra::create(v23, nullptr, v20, (cocos2d::SEL_MenuHandler)(unsigned __int64)v56); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v63->m_buttonMenu->addChild)( v63->m_buttonMenu, v24); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v24->setTag)(v24, 2); sub_10028CBE0((float *)v53, 50.0, 0.0); sub_10028CCE0(&v52, &v43, v53); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *))v24->setPosition)(v24, &v52); CCMenuItemSpriteExtra::setSizeMult(v24, 2.0); v25 = 8LL * (v10 == 1) + 952; if ( !v10 ) v25 = 944; v26 = v63; *(SetupInstantCountPopup_vtbl **)((char *)&v63->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v25) = (SetupInstantCountPopup_vtbl *)v18; if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v58.__r_.__value_.__l.__data_); ++v10; v11 = (__m128 *)v16; } while ( v10 != 3 ); SetupInstantCountPopup::updateItemIDInputLabel(v26); SetupInstantCountPopup::updateTargetIDInputLabel(v26); SetupInstantCountPopup::updateCountTextInputLabel(v26); SetupTriggerPopup::createMultiTriggerItemsDefault(v26); LOBYTE(v44) = 28; strcpy((char *)&v44 + 1, "Activate\nGroup"); m_activateGroup = v26->m_activateGroup; sub_10028CBE0((float *)v57, 50.0, -20.0); sub_10028CCE0((double *)&v58, &v55, v57); SetupTriggerPopup::createToggleButton( (__int64)v63, &v44, (__int64)SetupInstantCountPopup::onEnableGroup, 0, m_activateGroup, COERCE_DOUBLE(1112014848)); if ( (v44 & 1) != 0 ) operator delete(v45); sub_10028CBE0((float *)&v58, (float)(v60 * 0.5) + -28.0, (float)(0.5 * v61) + -42.0); LOBYTE(v46) = 12; strcpy((char *)&v46 + 1, "Equals"); m_mode = v63->m_mode; sub_10028CBE0((float *)v54, -90.0, 0.0); sub_10028CCE0((double *)v57, (unsigned __int64 *)&v58, v54); m_equalsToggler = SetupTriggerPopup::createToggleButton( (__int64)v63, &v46, (__int64)SetupInstantCountPopup::onCountType, 0, m_mode == 0, COERCE_DOUBLE(3266576384LL)); v30 = v63; v63->m_equalsToggler = (CCMenuItemToggler *)m_equalsToggler; if ( (v46 & 1) != 0 ) { operator delete(v47); m_equalsToggler = (__int64)v30->m_equalsToggler; } (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)m_equalsToggler + 72LL))(m_equalsToggler, 0); v30->m_equalsToggler->m_notClickable = 1; LOBYTE(v48) = 12; strcpy((char *)&v48 + 1, "Larger"); v31 = v30->m_mode; sub_10028CBE0((float *)v54, 0.0, 0.0); sub_10028CCE0((double *)v57, (unsigned __int64 *)&v58, v54); m_largerToggler = SetupTriggerPopup::createToggleButton( (__int64)v63, &v48, (__int64)SetupInstantCountPopup::onCountType, 0, v31 == 1, 0.0); v33 = v63; v63->m_largerToggler = (CCMenuItemToggler *)m_largerToggler; if ( (v48 & 1) != 0 ) { operator delete(v49); m_largerToggler = (__int64)v33->m_largerToggler; } (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)m_largerToggler + 72LL))(m_largerToggler, 1); v33->m_largerToggler->m_notClickable = 1; LOBYTE(v50) = 14; strcpy((char *)&v50 + 1, "Smaller"); v34 = v33->m_mode; sub_10028CBE0((float *)v54, 90.0, 0.0); sub_10028CCE0((double *)v57, (unsigned __int64 *)&v58, v54); m_smallerToggler = SetupTriggerPopup::createToggleButton( (__int64)v63, &v50, (__int64)SetupInstantCountPopup::onCountType, 0, v34 == 2, COERCE_DOUBLE(1119092736)); v36 = v63; v63->m_smallerToggler = (CCMenuItemToggler *)m_smallerToggler; if ( (v50 & 1) != 0 ) { operator delete(v51); m_smallerToggler = (__int64)v36->m_smallerToggler; } (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)m_smallerToggler + 72LL))(m_smallerToggler, 2); v36->m_smallerToggler->m_notClickable = 1; v36->m_disableTextDelegate = 0; return v62; }
GD Web Decomp Icon

GD Web Decomp

Raw Source