// // SetupItemEditTriggerPopup::init from 0x6b902c to 0x6b9b12 (2790 bytes) // // 1 xrefs: // > SetupItemEditTriggerPopup::create @ 0x6b9b90 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:56:45 +0000 // GameManager *__fastcall SetupItemEditTriggerPopup::init( const cocos2d::CCPoint **this, ItemTriggerGameObject *a2, cocos2d::CCArray *a3) { int v4; // r7 void (__fastcall *v5)(int, _BYTE *); // r8 int v6; // r9 cocos2d::CCDirector *MultiTriggerItemsDefaultHorizontal; // r0 double v8; // r0 int v9; // s15 int v10; // r0 int v11; // r11 double v12; // r0 int v13; // s15 int v14; // r0 int v15; // r11 double v16; // r0 int v17; // s15 int v18; // r0 int v19; // r10 int v20; // r4 int v21; // r7 ButtonSprite *v22; // r8 int v23; // r10 void (__fastcall *v24)(int, _BYTE *); // r9 int v25; // r0 CCMenuItemSpriteExtra *v26; // r9 const cocos2d::CCPoint *v27; // r10 float v28; // r2 float v29; // r1 float v30; // r0 int v31; // r4 void (__fastcall *v32)(int, _BYTE *); // r7 const char *v33; // r2 const cocos2d::CCPoint *v34; // r0 int v35; // r4 void (__fastcall *v36)(int, _BYTE *); // r9 bool v38; // [sp+4h] [bp-A0h] GameManager *v39; // [sp+30h] [bp-74h] void (__fastcall *v40)(CCMenuItemSpriteExtra *, _BYTE *); // [sp+3Ch] [bp-68h] float v41; // [sp+44h] [bp-60h] BYREF float v42; // [sp+48h] [bp-5Ch] _BYTE v43[8]; // [sp+4Ch] [bp-58h] BYREF _BYTE v44[8]; // [sp+54h] [bp-50h] BYREF _BYTE v45[8]; // [sp+5Ch] [bp-48h] BYREF _BYTE v46[8]; // [sp+64h] [bp-40h] BYREF _DWORD v47[2]; // [sp+6Ch] [bp-38h] BYREF int v48[3]; // [sp+74h] [bp-30h] BYREF int v49; // [sp+80h] [bp-24h] BYREF int v50; // [sp+84h] [bp-20h] int v51; // [sp+88h] [bp-1Ch] _BYTE v52[16]; // [sp+8Ch] [bp-18h] BYREF v39 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 420.0, 300.0, (_BYTE *)&dword_0 + 1, 0.0); if ( v39 ) { SetupTriggerPopup::preSetup((SetupTriggerPopup *)this); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Item Edit Trigger", 0x11u); v4 = SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v49); std::string::~string((int)&v49); v5 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v4 + 92); v6 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, -85.0, 0.0); cocos2d::CCPoint::operator+(v52, v6, v47); v5(v4, v52); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "OK", 2u); SetupTriggerPopup::addCloseButton((int)this, (int)&v49); std::string::~string((int)&v49); memset(v48, 0, sizeof(v48)); std::string::__init(v48, "Help", 4u); v49 = 0; v50 = 0; v51 = 0; std::string::__init( &v49, "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((int)this, (int)v48, (int)&v49, 1061997773); std::string::~string((int)&v49); std::string::~string((int)v48); MultiTriggerItemsDefaultHorizontal = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal((SetupTriggerPopup *)this); cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefaultHorizontal); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v41); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v41 * 0.5, (float)(v42 * 0.5) + 58.0); v8 = ((double (__fastcall *)(const cocos2d::CCPoint **, int))*((_DWORD *)*this + 183))(this, 476); v9 = (int)*(float *)&v8; v10 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)(int)*(float *)&v8, SHIDWORD(v8)); v49 = 0; v50 = 0; v51 = 0; v11 = v10; std::string::__init(&v49, "ItemID1", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, -105.0, 45.0); cocos2d::CCPoint::operator+(v52, v43, v47); IDNameInput::create((int)this, (int)(this + 110), v11, 80, (int)&v49, (int)v52, 0.8, 6, 0, 0, 1); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Item", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 20.0, 45.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 1, v9 == 1, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Timer", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 62.0, 45.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 2, v9 == 2, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Points", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 104.0, 45.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 3, v9 == 3, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Time", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 146.0, 45.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 4, v9 == 4, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Att", 3u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 188.0, 45.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 5, v9 == 5, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v12 = ((double (__fastcall *)(const cocos2d::CCPoint **, int))*((_DWORD *)*this + 183))(this, 477); v13 = (int)*(float *)&v12; v14 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)(int)*(float *)&v12, SHIDWORD(v12)); v49 = 0; v50 = 0; v51 = 0; v15 = v14; std::string::__init(&v49, "ItemID2", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, -105.0, 0.0); cocos2d::CCPoint::operator+(v52, v43, v47); IDNameInput::create((int)this, (int)(this + 110), v15, 95, (int)&v49, (int)v52, 0.8, 6, 0, 0, 1); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Item", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 20.0, 0.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 101, v13 == 1, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Timer", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 62.0, 0.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 102, v13 == 2, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Points", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 104.0, 0.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 103, v13 == 3, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Time", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 146.0, 0.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 104, v13 == 4, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Att", 3u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 188.0, 0.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 105, v13 == 5, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Mod:", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, -105.0, -45.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createValueControlAdvanced( this, 479, (unsigned __int8 *)&v49, (int)v52, 1061997773, 0, 1, 10, 0, -1073741824, 0x40000000, 0, 0, 1, 3, 0); std::string::~string((int)&v49); v16 = ((double (__fastcall *)(const cocos2d::CCPoint **, int))*((_DWORD *)*this + 183))(this, 478); v17 = (int)*(float *)&v16; v18 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)(int)*(float *)&v16, SHIDWORD(v16)); v49 = 0; v50 = 0; v51 = 0; v19 = v18; std::string::__init(&v49, "Target\nItemID", 0xDu); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, -105.0, -90.0); cocos2d::CCPoint::operator+(v52, v43, v47); IDNameInput::create((int)this, (int)(this + 110), v19, 51, (int)&v49, (int)v52, 0.8, 6, 0, 0, 1); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Item", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 20.0, -90.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 1001, v17 == 1, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Timer", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 62.0, -90.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 1002, v17 == 2, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); v49 = 0; v50 = 0; v51 = 0; std::string::__init(&v49, "Points", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 104.0, -90.0); cocos2d::CCPoint::operator+(v52, v43, v47); SetupTriggerPopup::createCustomToggleValueControl( (int)this, 1003, v17 == 3, 1, (int)&v49, (const cocos2d::CCPoint *)v52, 1, 0, 0); std::string::~string((int)&v49); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 2.0, 2.0); v20 = 0; do { switch ( v20 ) { case 1: v21 = 481; break; case 2: v21 = 482; break; case 3: v21 = 578; break; case 4: v21 = 579; break; case 5: v21 = 485; break; case 6: v21 = 486; break; default: v21 = 480; break; } v22 = ButtonSprite::create((ButtonSprite *)"+", &byte_9[6], (int)&byte_9[6], 1.0, COERCE_FLOAT(1), v38); (*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v22 + 80))(v22, 1061997773); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)v22 + 134) + 80))(*((_DWORD *)v22 + 134), 1066192077); v23 = *((_DWORD *)v22 + 134); v24 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v23 + 92); v25 = (*(int (__fastcall **)(int))(*(_DWORD *)v23 + 96))(v23); cocos2d::CCPoint::operator+(v52, v25, v44); v24(v23, v52); v47[0] = SetupItemEditTriggerPopup::onOpButton; v47[1] = 0; v26 = (CCMenuItemSpriteExtra *)CCMenuItemSpriteExtra::create( (int)v22, 0, (int)this, (int)SetupItemEditTriggerPopup::onOpButton, 0); (*(void (__fastcall **)(CCMenuItemSpriteExtra *, int))(*(_DWORD *)v26 + 36))(v26, v21); (*(void (__fastcall **)(_DWORD, CCMenuItemSpriteExtra *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v26); v27 = *(this + 111); v40 = *(void (__fastcall **)(CCMenuItemSpriteExtra *, _BYTE *))(*(_DWORD *)v26 + 92); if ( v20 > 4 ) { v28 = -90.0; v29 = (float)((float)(v20 - 2) * 42.0) + 20.0; } else { v28 = -45.0; v29 = (float)((float)v20 * 42.0) + 20.0; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, v29, v28); cocos2d::CCPoint::operator+(v46, v43, v45); ++v20; cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v52, v27); v40(v26, v52); v30 = (*((float (__fastcall **)(const cocos2d::CCPoint **, int))*this + 183))(this, v21); SetupItemEditTriggerPopup::updateOpButton((SetupItemEditTriggerPopup *)this, v26, (int)v30, v21); } while ( v20 != 7 ); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, v41 * 0.5, (float)(v42 * 0.5) - 82.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v52, 0.0, 0.0, 80.0, 80.0); v31 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v52); (*(void (__fastcall **)(int, int))(*(_DWORD *)v31 + 456))(v31, 50); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v31 + 480))(v31, &unk_BEFBB0); v32 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v31 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v52, 1520.0, 140.0); v32(v31, v52); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v31, 1); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v31 + 92))(v31, v45); (*(void (__fastcall **)(int, int))(*(_DWORD *)v31 + 80))(v31, 1048576000); v34 = (const cocos2d::CCPoint *)cocos2d::CCLabelBMFont::create( (cocos2d::CCLabelBMFont *)"T = (A + B) x M", "goldFont.fnt", v33); *(this + 178) = v34; (*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))( *(this + 115), v34, 2); v35 = (int)*(this + 178); v36 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v35 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, 1.0); cocos2d::CCPoint::operator+(v52, v45, v46); v36(v35, v52); SetupItemEditTriggerPopup::updateFormulaLabel((SetupItemEditTriggerPopup *)this); SetupTriggerPopup::postSetup((SetupTriggerPopup *)this); } return v39; }
GD Web Decomp Icon

GD Web Decomp

Raw Source