// // SetupItemCompareTriggerPopup::init from 0x57bda4 to 0x57c85c (2744 bytes) // // 1 xrefs: // > SetupItemCompareTriggerPopup::create @ 0x57c928 // // 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 SetupItemCompareTriggerPopup::init( SetupItemCompareTriggerPopup *a1, ItemTriggerGameObject *a2, cocos2d::CCArray *a3) { cocos2d::CCLabelBMFont *v4; // r6 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 int v6; // r9 cocos2d::CCDirector *v7; // r0 int v8; // r9 int v9; // s15 int v10; // r6 int v11; // r7 float v12; // s17 const char *v13; // r1 ButtonSprite *v14; // r9 cocos2d::CCLabelBMFont *m_label; // r11 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v17; // r0 CCMenuItemSpriteExtra *v18; // r9 cocos2d::CCMenu *m_buttonMenu; // r11 float v20; // r0 cocos2d::CCNode *v21; // r6 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7 cocos2d::CCLabelBMFont *v23; // r0 cocos2d::CCLabelBMFont *m_formulaLabel; // r6 void (__fastcall *v25)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCPoint v27; // [sp+4h] [bp-90h] cocos2d::CCPoint v28; // [sp+4h] [bp-90h] cocos2d::CCPoint v29; // [sp+4h] [bp-90h] cocos2d::CCPoint v30; // [sp+4h] [bp-90h] cocos2d::CCPoint v31; // [sp+4h] [bp-90h] cocos2d::CCPoint v32; // [sp+4h] [bp-90h] cocos2d::CCPoint v33; // [sp+4h] [bp-90h] cocos2d::CCPoint v34; // [sp+4h] [bp-90h] cocos2d::CCPoint v35; // [sp+4h] [bp-90h] cocos2d::CCPoint v36; // [sp+4h] [bp-90h] _BOOL4 v37; // [sp+34h] [bp-60h] void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+38h] [bp-5Ch] void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+44h] [bp-50h] cocos2d::CCSize v40; // [sp+4Ch] [bp-48h] BYREF cocos2d::CCPoint v41; // [sp+54h] [bp-40h] BYREF cocos2d::CCPoint v42; // [sp+5Ch] [bp-38h] BYREF cocos2d::CCPoint v43; // [sp+64h] [bp-30h] BYREF cocos2d::CCPoint v44; // [sp+6Ch] [bp-28h] BYREF cocos2d::CCPoint v45; // [sp+74h] [bp-20h] BYREF cocos2d::CCRect v46; // [sp+7Ch] [bp-18h] BYREF cocos2d::CCRect v47; // 0:r2.8,8:^0.8 v37 = SetupTriggerPopup::init(a1, a2, a3, 430.0, 310.0, 1); if ( v37 ) { SetupTriggerPopup::preSetup(a1); sub_776584((int)&v46, "Item Compare"); v4 = SetupTriggerPopup::addTitle((int)a1); sub_774008(&v46); setPosition = v4->setPosition; v6 = (int)v4->getPosition(v4); cocos2d::CCPoint::CCPoint(&v45, -85.0, 0.0); cocos2d::CCPoint::operator+(&v46, v6, &v45); setPosition(v4, &v46.origin); sub_776584((int)&v46, "OK"); SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v46); sub_774008(&v46); sub_776584((int)&v45, "Help"); sub_776584( (int)&v46, "Activates TrueID or FalseID based on comparison of ItemID1 and ItemID2.\n" "Use Item, Timer, Points, Time, or Att to specify type.\n" "Mod1 and Mod2 are modifiers for the two Item IDs.\n" "The first operator button sets interaction between ItemID1 and Mod 1 and similar for the second.\n" "The third sets how the two values are compared.\n" "Button 4/5 can be used to force values positive or negative.\n" "Tol allows the result to be off a certain amount.\n" "Click NA to switch to different rounding functions."); SetupTriggerPopup::addHelpButton((int)a1, (int)&v45, (int)&v46, 1065353216); sub_774008(&v46); sub_774008(&v45); SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1); v7 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v40, v7); cocos2d::CCPoint::CCPoint(&v41, v40.width * 0.5, (float)(v40.height * 0.5) + 66.0); sub_776584((int)&v44, "ItemID1"); cocos2d::CCPoint::CCPoint(&v45, -100.0, 42.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 80, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 1, Int, 10, 1, nullptr, 9999.0, 0, 0, 1, 0, 0); sub_774008(&v44); SetupTriggerPopup::toggleLimitValue(a1, 80, 1); v8 = (int)a1->getValue(a1, 476); sub_776584((int)&v44, "Item"); cocos2d::CCPoint::CCPoint(&v45, 20.0, 43.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v27.x) = &v46; LODWORD(v27.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 1, v8 == 1, 1, (std::string)&v44, v27, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Timer"); cocos2d::CCPoint::CCPoint(&v45, 62.0, 43.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v28.x) = &v46; LODWORD(v28.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 2, v8 == 2, 1, (std::string)&v44, v28, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Points"); cocos2d::CCPoint::CCPoint(&v45, 104.0, 43.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v29.x) = &v46; LODWORD(v29.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 3, v8 == 3, 1, (std::string)&v44, v29, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Time"); cocos2d::CCPoint::CCPoint(&v45, 146.0, 43.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v30.x) = &v46; LODWORD(v30.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 4, v8 == 4, 1, (std::string)&v44, v30, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Att"); cocos2d::CCPoint::CCPoint(&v45, 188.0, 43.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v31.x) = &v46; LODWORD(v31.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 5, v8 == 5, 1, (std::string)&v44, v31, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "ItemID2"); cocos2d::CCPoint::CCPoint(&v45, -100.0, 0.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 95, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 1, Int, 10, 1, nullptr, 9999.0, 0, 0, 1, 0, 0); sub_774008(&v44); SetupTriggerPopup::toggleLimitValue(a1, 95, 1); v9 = (int)a1->getValue(a1, 477); sub_776584((int)&v44, "Item"); cocos2d::CCPoint::CCPoint(&v45, 20.0, -1.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v32.x) = &v46; LODWORD(v32.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 101, v9 == 1, 1, (std::string)&v44, v32, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Timer"); cocos2d::CCPoint::CCPoint(&v45, 62.0, -1.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v33.x) = &v46; LODWORD(v33.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 102, v9 == 2, 1, (std::string)&v44, v33, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Points"); cocos2d::CCPoint::CCPoint(&v45, 104.0, -1.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v34.x) = &v46; LODWORD(v34.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 103, v9 == 3, 1, (std::string)&v44, v34, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Time"); cocos2d::CCPoint::CCPoint(&v45, 146.0, -1.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v35.x) = &v46; LODWORD(v35.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 104, v9 == 4, 1, (std::string)&v44, v35, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Att"); cocos2d::CCPoint::CCPoint(&v45, 188.0, -1.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); LODWORD(v36.x) = &v46; LODWORD(v36.y) = 1; SetupTriggerPopup::createCustomToggleValueControl(a1, 105, v9 == 5, 1, (std::string)&v44, v36, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Mod1:"); cocos2d::CCPoint::CCPoint(&v45, -100.0, -42.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 479, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 0, Float, 10, 0, (cocos2d::CCFloat *)0xC0000000, 2.0, 0, 0, 1, 3, 0); sub_774008(&v44); sub_776584((int)&v44, "Mod2:"); cocos2d::CCPoint::CCPoint(&v45, 100.0, -42.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 483, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 0, Float, 10, 0, (cocos2d::CCFloat *)0xC0000000, 2.0, 0, 0, 1, 3, 0); sub_774008(&v44); sub_776584((int)&v44, "TrueID"); cocos2d::CCPoint::CCPoint(&v45, -100.0, -84.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 51, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 1, Int, 10, 1, nullptr, 9999.0, 0, 0, 1, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "FalseID"); cocos2d::CCPoint::CCPoint(&v45, 100.0, -84.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 71, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 1, Int, 10, 1, nullptr, 9999.0, 0, 0, 1, 0, 0); sub_774008(&v44); sub_776584((int)&v44, "Tol+-:"); cocos2d::CCPoint::CCPoint(&v45, -100.0, -126.0); cocos2d::CCPoint::operator+(&v46, &v41, &v45); SetupTriggerPopup::createValueControlAdvanced( (unsigned int)a1, 484, (int)&v44, &v46.origin, (cocos2d::CCZone *)0x3F4CCCCD, 0, Float, 10, 0, nullptr, 1.0, 0, 0, 1, 3, 0); v10 = 0; sub_774008(&v44); cocos2d::CCPoint::CCPoint(&v42, 2.0, 2.0); while ( 1 ) { switch ( v10 ) { case 1: v11 = 481; break; case 2: v11 = 482; break; case 3: v11 = 578; break; case 4: v11 = 579; break; case 5: v11 = 485; v12 = 15.0; LABEL_12: v13 = (const char *)&word_32; goto LABEL_13; case 6: v11 = 486; v12 = 36.0; goto LABEL_12; default: v11 = 480; break; } v12 = 0.0; v13 = byte_9 + 6; LABEL_13: v14 = ButtonSprite::create((ButtonSprite *)"+", v13, 15, 0.4, COERCE_FLOAT(1), SLOBYTE(v47.size.height)); ((void (__fastcall *)(ButtonSprite *, int))v14->setScale)(v14, 1061997773); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v14->m_label->setScale)(v14->m_label, 1066192077); m_label = v14->m_label; v16 = m_label->setPosition; v17 = (int)m_label->getPosition(m_label); cocos2d::CCPoint::operator+(&v46, v17, &v42); v16(m_label, &v46.origin); LODWORD(v45.x) = SetupItemCompareTriggerPopup::onOpButton; v45.y = 0.0; v18 = CCMenuItemSpriteExtra::create( v14, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetupItemCompareTriggerPopup::onOpButton, (unsigned int)a1)); v18->setTag(v18, v11); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v18); m_buttonMenu = a1->m_buttonMenu; if ( v10 <= 4 ) { v39 = v18->setPosition; cocos2d::CCPoint::CCPoint(&v43, (float)((float)v10 * 42.0) + 20.0, -125.0); cocos2d::CCPoint::operator+(&v44, &v41, &v43); cocos2d::CCNode::convertToNodeSpace(&v46.origin, m_buttonMenu, &v44); v39(v18, &v46.origin); } else { v38 = v18->setPosition; cocos2d::CCPoint::CCPoint( &v44, (float)((float)((float)(v40.width * 0.5) + 75.0) + (float)(50 * (v10 % 5))) + v12, (float)((float)(v40.height * 0.5) - 60.0) - 35.0); cocos2d::CCNode::convertToNodeSpace(&v46.origin, m_buttonMenu, &v44); v38(v18, &v46.origin); } ++v10; v20 = a1->getValue(a1, v11); SetupItemCompareTriggerPopup::updateOpButton(a1, v18, (int)v20, v11); if ( v10 == 7 ) { cocos2d::CCPoint::CCPoint(&v43, (float)(v40.width * 0.5) - 80.0, (float)(v40.height * 0.5) - 95.0); cocos2d::CCRect::CCRect(&v46, 0.0, 0.0, 80.0, 80.0); v21 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v46, v47); ((void (__fastcall *)(cocos2d::CCNode *, int))v21->__vftable[1].~CCNode_0)(v21, 50); ((void (__fastcall *)(cocos2d::CCNode *, void *))v21->__vftable[1].getTag)(v21, &unk_9ADA24); setContentSize = v21->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v46, 960.0, 88.0); setContentSize(v21, (const cocos2d::CCSize *)&v46); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v21, 1); v21->setPosition(v21, &v43); ((void (__fastcall *)(cocos2d::CCNode *, int))v21->setScale)(v21, 1048576000); v23 = cocos2d::CCLabelBMFont::create(); a1->m_formulaLabel = v23; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v23, 2); m_formulaLabel = a1->m_formulaLabel; v25 = m_formulaLabel->setPosition; cocos2d::CCPoint::CCPoint(&v44, 0.0, 1.0); cocos2d::CCPoint::operator+(&v46, &v43, &v44); v25(m_formulaLabel, &v46.origin); SetupItemCompareTriggerPopup::updateFormulaLabel(a1); SetupTriggerPopup::postSetup(a1); return v37; } } } return v37; }
GD Web Decomp Icon

GD Web Decomp

Raw Source