// // SetupItemEditTriggerPopup::init from 0xb7c98c to 0xb7d96c (4064 bytes) // // 2 xrefs: // > SetupItemEditTriggerPopup::create @ 0xb7dbd4 // > @ 0xf4078 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:02:26 +0000 // __int64 __fastcall SetupItemEditTriggerPopup::init( SetupItemEditTriggerPopup *this, ItemTriggerGameObject *a2, cocos2d::CCArray *a3) { __int64 v5; // x23 void (__fastcall *v6)(__int64, __int64 *); // x24 __int64 v7; // x25 __int64 v8; // x2 __int64 v9; // x3 __int64 v10; // x4 __int64 v11; // x5 const char *v12; // x6 cocos2d::CCDirector *MultiTriggerItemsDefaultHorizontal; // x0 cocos2d::CCDirector *v14; // x0 unsigned int v15; // w23 int v16; // w1 unsigned int v17; // w26 unsigned int v18; // w23 int v19; // w1 unsigned int v20; // w26 unsigned int v21; // w23 int v22; // w1 unsigned int v23; // w26 int v24; // w27 bool v25; // w4 __int64 v26; // x5 const char *v27; // x6 cocos2d::CCNode *v28; // x26 void (__fastcall *v29)(CCMenuItemSpriteExtra *, __int64 *); // x28 float v30; // s0 unsigned int v31; // w22 _QWORD **v32; // x23 _QWORD *v33; // x28 void (__fastcall *v34)(_QWORD *, __int64 *); // x26 __int64 v35; // x0 CCMenuItemSpriteExtra *v36; // x23 __int64 v37; // x22 void (__fastcall *v38)(__int64, __int64 *); // x23 const char *v39; // x2 __int64 v40; // x0 __int64 v41; // x22 void (__fastcall *v42)(__int64, __int64 *); // x23 int v43; // [xsp+8h] [xbp-28h] int v44; // [xsp+8h] [xbp-28h] cocos2d::CCNode *v45; // [xsp+D0h] [xbp+A0h] void (__fastcall *v46)(CCMenuItemSpriteExtra *, __int64 *); // [xsp+D8h] [xbp+A8h] unsigned __int8 v47; // [xsp+E7h] [xbp+B7h] __int64 v48; // [xsp+F0h] [xbp+C0h] BYREF _BYTE v49[8]; // [xsp+F8h] [xbp+C8h] BYREF _BYTE v50[8]; // [xsp+100h] [xbp+D0h] BYREF _BYTE v51[8]; // [xsp+108h] [xbp+D8h] BYREF __int64 v52; // [xsp+110h] [xbp+E0h] BYREF __int64 v53[2]; // [xsp+118h] [xbp+E8h] BYREF __int64 v54[2]; // [xsp+128h] [xbp+F8h] BYREF void *v55; // [xsp+138h] [xbp+108h] __int64 v56; // [xsp+140h] [xbp+110h] BYREF __int64 v57; // [xsp+148h] [xbp+118h] void *v58; // [xsp+150h] [xbp+120h] v47 = SetupTriggerPopup::init(this, a2, a3, 420.0, 300.0, 1u, 0.0); if ( v47 ) { SetupTriggerPopup::preSetup(this); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Item Edit Trigger", 0x11u); v5 = SetupTriggerPopup::addTitle((__int64)this, (__int64)&v56); if ( (v56 & 1) != 0 ) operator delete(v58); v6 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v5 + 184LL); v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 192LL))(v5); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, -85.0, 0.0); cocos2d::CCPoint::operator+(v53, v7); v6(v5, v53); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "OK", 2u); SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v56, v8, v9, v10, v11, v12); if ( (v56 & 1) != 0 ) operator delete(v58); v54[0] = 0; v54[1] = 0; v55 = nullptr; std::string::__init(v54, "Help", 4u); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init( &v56, "Edits Target ItemID using operations on ItemID1 and ItemID2.\n" "Use Item, Timer, Points, Time, or Att to specify type.\n" "The first operator button sets the interaction with target.\n" "The second sets interaction between the two initial IDs.\n" "The third sets how Mod interacts with the equation.\n" "Button 4/5 are used to force the values positive or negative.\n" "Click the NA button to switch to different rounding functions.", 0x1C1u); SetupTriggerPopup::addHelpButton((__int64)this, (char *)v54, (char *)&v56, 0.8); if ( (v56 & 1) != 0 ) operator delete(v58); if ( (v54[0] & 1) != 0 ) operator delete(v55); MultiTriggerItemsDefaultHorizontal = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(this); v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefaultHorizontal); cocos2d::CCDirector::getWinSize(&v48, v14); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v49, *(float *)&v48 * 0.5, (float)(*((float *)&v48 + 1) * 0.5) + 58.0); v15 = (int)(*(float (__fastcall **)(SetupItemEditTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 476); v17 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)v15, v16); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "ItemID1", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, -105.0, 45.0); cocos2d::CCPoint::operator+(v53, v49); IDNameInput::create(this, (char *)this + 544, v17, 80, &v56, v53, 6, 0, 0.8, 0, 1); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Item", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 20.0, 45.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 1u, v15 == 1, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Timer", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 62.0, 45.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 2u, v15 == 2, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Points", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 104.0, 45.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 3u, v15 == 3, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Time", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 146.0, 45.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 4u, v15 == 4, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Att", 3u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 188.0, 45.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 5u, v15 == 5, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v18 = (int)(*(float (__fastcall **)(SetupItemEditTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 477); v20 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)v18, v19); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "ItemID2", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, -105.0, 0.0); cocos2d::CCPoint::operator+(v53, v49); LOBYTE(v43) = 1; IDNameInput::create(this, (char *)this + 544, v20, 95, &v56, v53, 6, 0, 0.8, 0, v43); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Item", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 20.0, 0.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x65u, v18 == 1, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Timer", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 62.0, 0.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x66u, v18 == 2, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Points", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 104.0, 0.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x67u, v18 == 3, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Time", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 146.0, 0.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x68u, v18 == 4, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Att", 3u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 188.0, 0.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x69u, v18 == 5, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Mod:", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, -105.0, -45.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createValueControlAdvanced( (cocos2d::CCArray **)this, 479, (char *)&v56, (__int64)v53, 0, 1, 10, 0, 0.8, -2.0, 2.0, 0, 0, 1, 3, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v21 = (int)(*(float (__fastcall **)(SetupItemEditTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 478); v23 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)v21, v22); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Target\nItemID", 0xDu); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, -105.0, -90.0); cocos2d::CCPoint::operator+(v53, v49); LOBYTE(v44) = 1; IDNameInput::create(this, (char *)this + 544, v23, 51, &v56, v53, 6, 0, 0.8, 0, v44); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Item", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 20.0, -90.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x3E9u, v21 == 1, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Timer", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 62.0, -90.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x3EAu, v21 == 2, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v56 = 0; v57 = 0; v58 = nullptr; std::string::__init(&v56, "Points", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 104.0, -90.0); cocos2d::CCPoint::operator+(v53, v49); SetupTriggerPopup::createCustomToggleValueControl( (__int64)this, 0x3EBu, v21 == 3, 1u, (char *)&v56, (const cocos2d::CCPoint *)v53, 1u, 0, 0); if ( (v56 & 1) != 0 ) operator delete(v58); v24 = 0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v50, 2.0, 2.0); do { switch ( v24 ) { case 1: v31 = 481; break; case 2: v31 = 482; break; case 3: v31 = 578; break; case 4: v31 = 579; break; case 5: v31 = 485; break; case 6: v31 = 486; break; default: v31 = 480; break; } v32 = (_QWORD **)ButtonSprite::create((ButtonSprite *)"+", &byte_9[6], (int)&byte_9[6], 1, 1.0, v25, v26, v27); ((void (__fastcall *)(_QWORD **, float))(*v32)[20])(v32, 0.8); (*(void (__fastcall **)(_QWORD *, float))(*v32[78] + 160LL))(v32[78], 1.1); v33 = v32[78]; v34 = *(void (__fastcall **)(_QWORD *, __int64 *))(*v33 + 184LL); v35 = (*(__int64 (__fastcall **)(_QWORD *))(*v33 + 192LL))(v33); cocos2d::CCPoint::operator+(v53, v35); v34(v33, v53); v36 = (CCMenuItemSpriteExtra *)CCMenuItemSpriteExtra::create( (__int64)v32, 0, (__int64)this, (__int64)SetupItemEditTriggerPopup::onOpButton, 0); (*(void (__fastcall **)(CCMenuItemSpriteExtra *, _QWORD))(*(_QWORD *)v36 + 72LL))(v36, v31); (*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**((_QWORD **)this + 69) + 456LL))( *((_QWORD *)this + 69), v36); if ( v24 <= 4 ) { v28 = *((cocos2d::CCNode **)this + 69); v29 = *(void (__fastcall **)(CCMenuItemSpriteExtra *, __int64 *))(*(_QWORD *)v36 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v51, (float)((float)v24 * 42.0) + 20.0, -45.0); cocos2d::CCPoint::operator+(&v52, v49); cocos2d::CCNode::convertToNodeSpace(v53, v28, (const cocos2d::CCPoint *)&v52); v29(v36, v53); } else { v46 = *(void (__fastcall **)(CCMenuItemSpriteExtra *, __int64 *))(*(_QWORD *)v36 + 184LL); v45 = *((cocos2d::CCNode **)this + 69); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v51, (float)((float)(v24 - 2) * 42.0) + 20.0, -90.0); cocos2d::CCPoint::operator+(&v52, v49); cocos2d::CCNode::convertToNodeSpace(v53, v45, (const cocos2d::CCPoint *)&v52); v46(v36, v53); } ++v24; v30 = (*(float (__fastcall **)(SetupItemEditTriggerPopup *, _QWORD))(*(_QWORD *)this + 1464LL))(this, v31); SetupItemEditTriggerPopup::updateOpButton(this, v36, (int)v30, v31); } while ( v24 != 7 ); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v51, *(float *)&v48 * 0.5, (float)(*((float *)&v48 + 1) * 0.5) + -82.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v53, 0.0, 0.0, 80.0, 80.0); v37 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v53); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v37 + 912LL))(v37, 50); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v37 + 960LL))(v37, &unk_1192240); v38 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v37 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v53, 1520.0, 140.0); v38(v37, v53); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v37, 1); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v37 + 184LL))(v37, v51); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v37 + 160LL))(v37, 0.25); v40 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"T = (A + B) x M", "goldFont.fnt", v39); *((_QWORD *)this + 127) = v40; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v40, 2); v41 = *((_QWORD *)this + 127); v42 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v41 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 0.0, 1.0); cocos2d::CCPoint::operator+(v53, v51); v42(v41, v53); SetupItemEditTriggerPopup::updateFormulaLabel(this); SetupTriggerPopup::postSetup(this); } return v47; }
GD Web Decomp Icon

GD Web Decomp

Raw Source