// // SetupItemCompareTriggerPopup::init from 0x100580b00 to 0x100581d33 (4659 bytes) // // 1 xrefs: // > SetupItemCompareTriggerPopup::create @ 0x100580abb // // 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 SetupItemCompareTriggerPopup::init( SetupItemCompareTriggerPopup *a1, ItemTriggerGameObject *a2, cocos2d::CCArray *a3) { bool result; // al cocos2d::CCLabelBMFont *v4; // r14 unsigned __int64 *v5; // r15 SetupItemCompareTriggerPopup_vtbl *v6; // rax int v7; // ebx SetupTriggerPopup *v8; // rbx int v9; // ebx cocos2d::CCObject *v10; // rbx unsigned int v11; // edx int v12; // r14d const cocos2d::CCPoint *m_buttonMenu; // r13 int v14; // r14d int v15; // r13d float v16; // xmm0_4 unsigned int v17; // r13d unsigned int v18; // edx int v19; // esi int v20; // r14d ButtonSprite *v21; // r15 cocos2d::CCLabelBMFont *m_label; // rbx unsigned __int64 *v23; // rax SetupItemCompareTriggerPopup *v24; // rbx CCMenuItemSpriteExtra *v25; // r15 CCMenuItemSpriteExtra_vtbl *v26; // rax cocos2d::extension::CCScale9Sprite *v27; // r15 cocos2d::CCLabelBMFont *v28; // rax cocos2d::CCLabelBMFont *m_formulaLabel; // r15 unsigned __int64 v30; // [rsp+40h] [rbp-280h] BYREF cocos2d::CCMenu *v31; // [rsp+48h] [rbp-278h] __int128 v32; // [rsp+50h] [rbp-270h] BYREF void *v33; // [rsp+60h] [rbp-260h] __int128 v34; // [rsp+68h] [rbp-258h] BYREF void *v35; // [rsp+78h] [rbp-248h] char v36; // [rsp+80h] [rbp-240h] BYREF char v37[15]; // [rsp+81h] [rbp-23Fh] BYREF void *v38; // [rsp+90h] [rbp-230h] char v39; // [rsp+98h] [rbp-228h] BYREF char v40[15]; // [rsp+99h] [rbp-227h] BYREF void *v41; // [rsp+A8h] [rbp-218h] __int128 v42; // [rsp+B0h] [rbp-210h] BYREF void *v43; // [rsp+C0h] [rbp-200h] __int128 v44; // [rsp+C8h] [rbp-1F8h] BYREF void *v45; // [rsp+D8h] [rbp-1E8h] __int128 v46; // [rsp+E0h] [rbp-1E0h] BYREF void *v47; // [rsp+F0h] [rbp-1D0h] __int128 v48; // [rsp+F8h] [rbp-1C8h] BYREF void *v49; // [rsp+108h] [rbp-1B8h] __int128 v50; // [rsp+110h] [rbp-1B0h] BYREF void *v51; // [rsp+120h] [rbp-1A0h] __int128 v52; // [rsp+128h] [rbp-198h] BYREF void *v53; // [rsp+138h] [rbp-188h] __int128 v54; // [rsp+140h] [rbp-180h] BYREF void *v55; // [rsp+150h] [rbp-170h] char v56[16]; // [rsp+158h] [rbp-168h] BYREF void *v57; // [rsp+168h] [rbp-158h] char v58[16]; // [rsp+170h] [rbp-150h] BYREF void *v59; // [rsp+180h] [rbp-140h] unsigned __int64 v60; // [rsp+188h] [rbp-138h] BYREF char v61; // [rsp+190h] [rbp-130h] BYREF _BYTE v62[23]; // [rsp+191h] [rbp-12Fh] BYREF char v63; // [rsp+1A8h] [rbp-118h] BYREF char v64[15]; // [rsp+1A9h] [rbp-117h] BYREF void *v65; // [rsp+1B8h] [rbp-108h] __int128 v66; // [rsp+1C0h] [rbp-100h] BYREF void *v67; // [rsp+1D0h] [rbp-F0h] char v68; // [rsp+1D8h] [rbp-E8h] BYREF char v69[15]; // [rsp+1D9h] [rbp-E7h] BYREF void *v70; // [rsp+1E8h] [rbp-D8h] __int128 v71; // [rsp+1F0h] [rbp-D0h] BYREF void *v72; // [rsp+200h] [rbp-C0h] char v73; // [rsp+208h] [rbp-B8h] BYREF char v74[15]; // [rsp+209h] [rbp-B7h] BYREF void *v75; // [rsp+218h] [rbp-A8h] char v76; // [rsp+220h] [rbp-A0h] BYREF char v77[15]; // [rsp+221h] [rbp-9Fh] BYREF void *v78; // [rsp+230h] [rbp-90h] char v79; // [rsp+238h] [rbp-88h] BYREF char v80[15]; // [rsp+239h] [rbp-87h] BYREF void *v81; // [rsp+248h] [rbp-78h] unsigned int v82; // [rsp+250h] [rbp-70h] int v83; // [rsp+254h] [rbp-6Ch] float v84; // [rsp+258h] [rbp-68h] unsigned __int64 v85; // [rsp+25Ch] [rbp-64h] BYREF float v86; // [rsp+264h] [rbp-5Ch] SetupItemCompareTriggerPopup *v87; // [rsp+268h] [rbp-58h] bool v88; // [rsp+277h] [rbp-49h] unsigned __int64 v89; // [rsp+278h] [rbp-48h] BYREF double v90[2]; // [rsp+280h] [rbp-40h] BYREF unsigned __int64 v91[6]; // [rsp+290h] [rbp-30h] BYREF double v92; // 0:xmm0_8.8 double v93; // 0:xmm0_8.8 cocos2d::CCRect v94; // 0:xmm0_8.8,8:xmm1_8.8 result = SetupTriggerPopup::init(a1, a2, a3, 430.0, 310.0, 1); if ( result ) { v88 = result; SetupTriggerPopup::preSetup(a1); v61 = 24; strcpy(v62, "Item Compare"); v4 = SetupTriggerPopup::addTitle((__int64)a1, (__int64)&v61); if ( (v61 & 1) != 0 ) operator delete(*(void **)&v62[15]); v5 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v4->getPosition)(v4); sub_10028CBE0((float *)&v85, -85.0, 0.0); sub_10028CCE0(v90, v5, &v85); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v4->setPosition)(v4, v90); v36 = 4; strcpy(v37, "OK"); SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v36); if ( (v36 & 1) != 0 ) operator delete(v38); v39 = 8; strcpy(v40, "Help"); v43 = operator new(0x218u); *(_QWORD *)&v42 = 537; *((_QWORD *)&v42 + 1) = 532; strcpy( (char *)v43, "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((__int64)a1, (__int64)&v39, &v42, (__m128)0x3F800000u); if ( (v42 & 1) != 0 ) operator delete(v43); if ( (v39 & 1) != 0 ) operator delete(v41); SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v85); sub_10028CBE0((float *)&v89, *(float *)&v85 * 0.5, (float)(*((float *)&v85 + 1) * 0.5) + 66.0); v63 = 14; strcpy(v64, "ItemID1"); sub_10028CBE0((float *)v91, -100.0, 42.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 80, (__int64)&v63, (float *)v90, 1, Int, 0.80000001, 0.0, 9999.0, 10, 1, 0, 0, 1, 0, 0); if ( (v63 & 1) != 0 ) operator delete(v65); SetupTriggerPopup::toggleLimitValue(a1, 80, 1); v6 = a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v87 = a1; v86 = ((float (__fastcall *)(SetupItemCompareTriggerPopup *, __int64))v6->getValue)(a1, 476); LOBYTE(v44) = 8; strcpy((char *)&v44 + 1, "Item"); sub_10028CBE0((float *)v91, 20.0, 43.0); sub_10028CCE0(v90, &v89, v91); v7 = (int)v86; SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 1, (int)v86 == 1, 1, &v44, (__int64)v90, 1, 0, 0); if ( (v44 & 1) != 0 ) operator delete(v45); strcpy((char *)&v46, "\nTimer"); sub_10028CBE0((float *)v91, 62.0, 43.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 2, v7 == 2, 1, &v46, (__int64)v90, 1, 0, 0); if ( (v46 & 1) != 0 ) operator delete(v47); LOBYTE(v66) = 12; strcpy((char *)&v66 + 1, "Points"); sub_10028CBE0((float *)v91, 104.0, 43.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 3, v7 == 3, 1, &v66, (__int64)v90, 1, 0, 0); if ( (v66 & 1) != 0 ) operator delete(v67); LOBYTE(v48) = 8; strcpy((char *)&v48 + 1, "Time"); sub_10028CBE0((float *)v91, 146.0, 43.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 4, v7 == 4, 1, &v48, (__int64)v90, 1, 0, 0); if ( (v48 & 1) != 0 ) operator delete(v49); LOBYTE(v32) = 6; *(_DWORD *)((char *)&v32 + 1) = 7631937; sub_10028CBE0((float *)v91, 188.0, 43.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 5, v7 == 5, 1, &v32, (__int64)v90, 1, 0, 0); if ( (v32 & 1) != 0 ) operator delete(v33); v68 = 14; strcpy(v69, "ItemID2"); sub_10028CBE0((float *)v91, -100.0, 0.0); v8 = v87; sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)v8, 95, (__int64)&v68, (float *)v90, 1, Int, 0.80000001, 0.0, 9999.0, 10, 1, 0, 0, 1, 0, 0); if ( (v68 & 1) != 0 ) operator delete(v70); SetupTriggerPopup::toggleLimitValue(v8, 95, 1); v86 = ((float (__fastcall *)(SetupTriggerPopup *, __int64))v8->getValue)(v8, 477); LOBYTE(v50) = 8; strcpy((char *)&v50 + 1, "Item"); sub_10028CBE0((float *)v91, 20.0, -1.0); sub_10028CCE0(v90, &v89, v91); v9 = (int)v86; SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 101, (int)v86 == 1, 1, &v50, (__int64)v90, 1, 0, 0); if ( (v50 & 1) != 0 ) operator delete(v51); strcpy((char *)&v52, "\nTimer"); sub_10028CBE0((float *)v91, 62.0, -1.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 102, v9 == 2, 1, &v52, (__int64)v90, 1, 0, 0); if ( (v52 & 1) != 0 ) operator delete(v53); LOBYTE(v71) = 12; strcpy((char *)&v71 + 1, "Points"); sub_10028CBE0((float *)v91, 104.0, -1.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 103, v9 == 3, 1, &v71, (__int64)v90, 1, 0, 0); if ( (v71 & 1) != 0 ) operator delete(v72); LOBYTE(v54) = 8; strcpy((char *)&v54 + 1, "Time"); sub_10028CBE0((float *)v91, 146.0, -1.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 104, v9 == 4, 1, &v54, (__int64)v90, 1, 0, 0); if ( (v54 & 1) != 0 ) operator delete(v55); LOBYTE(v34) = 6; *(_DWORD *)((char *)&v34 + 1) = 7631937; sub_10028CBE0((float *)v91, 188.0, -1.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createCustomToggleValueControl((__int64)v87, 105, v9 == 5, 1, &v34, (__int64)v90, 1, 0, 0); if ( (v34 & 1) != 0 ) operator delete(v35); strcpy(v56, "\nMod1:"); sub_10028CBE0((float *)v91, -100.0, -42.0); v10 = v87; sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)v10, 479, (__int64)v56, (float *)v90, 0, Float, 0.80000001, -2.0, 2.0, 10, 0, 0, 0, 1, 3, 0); if ( (v56[0] & 1) != 0 ) operator delete(v57); strcpy(v58, "\nMod2:"); sub_10028CBE0((float *)v91, 100.0, -42.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)v10, 483, (__int64)v58, (float *)v90, 0, Float, 0.80000001, -2.0, 2.0, 10, 0, 0, 0, 1, 3, 0); if ( (v58[0] & 1) != 0 ) operator delete(v59); v73 = 12; strcpy(v74, "TrueID"); sub_10028CBE0((float *)v91, -100.0, -84.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)v10, 51, (__int64)&v73, (float *)v90, 1, Int, 0.80000001, 0.0, 9999.0, 10, 1, 0, 0, 1, 0, 0); if ( (v73 & 1) != 0 ) operator delete(v75); v76 = 14; strcpy(v77, "FalseID"); sub_10028CBE0((float *)v91, 100.0, -84.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)v10, 71, (__int64)&v76, (float *)v90, 1, Int, 0.80000001, 0.0, 9999.0, 10, 1, 0, 0, 1, 0, 0); if ( (v76 & 1) != 0 ) operator delete(v78); v79 = 12; strcpy(v80, "Tol+-:"); sub_10028CBE0((float *)v91, -100.0, -126.0); sub_10028CCE0(v90, &v89, v91); SetupTriggerPopup::createValueControlAdvanced( (__int64)v10, 484, (__int64)&v79, (float *)v90, 0, Float, 0.80000001, 0.0, 1.0, 10, 0, 0, 0, 1, 3, 0); if ( (v79 & 1) != 0 ) operator delete(v81); sub_10028CBE0((float *)v91, 2.0, 2.0); v11 = -1; v12 = -250; do { v83 = v12; if ( v11 > 5 ) { v84 = 0.0; v17 = 480; } else { v17 = dword_10081ECF8[v11]; v84 = flt_10081ED10[v11]; } v18 = v11 + 1; v19 = 50; if ( v18 < 5 ) v19 = 15; v20 = v18; v21 = sub_100092A60("+", v19, 15, 1, 0.40000001); ((void (__fastcall *)(ButtonSprite *, float))v21->setScale)(v21, 0.80000001); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v21->m_label->setScale)(v21->m_label, 1.1); m_label = v21->m_label; v23 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_label->getPosition)(m_label); sub_10028CCE0(v90, v23, v91); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_label->setPosition)(m_label, v90); v24 = v87; v25 = CCMenuItemSpriteExtra::create( v21, nullptr, v87, (cocos2d::SEL_MenuHandler)(unsigned __int64)SetupItemCompareTriggerPopup::onOpButton); v26 = v25->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v86 = *(float *)&v17; ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v26->setTag)(v25, v17); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v24->m_buttonMenu->addChild)( v24->m_buttonMenu, v25); v82 = v20; if ( (unsigned int)v20 < 5 ) { m_buttonMenu = (const cocos2d::CCPoint *)v24->m_buttonMenu; sub_10028CBE0((float *)&v30, (float)((float)v20 * 42.0) + 20.0, -125.0); sub_10028CCE0((double *)&v60, &v89, &v30); *(cocos2d::CCPoint *)&v92 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v90, m_buttonMenu); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *, double))v25->setPosition)(v25, v90, v92); v14 = v83; } else { v31 = v24->m_buttonMenu; v14 = v83; sub_10028CBE0( (float *)&v60, v84 + (float)((float)v83 + (float)((float)(*(float *)&v85 * 0.5) + 75.0)), (float)((float)(*((float *)&v85 + 1) * 0.5) + -60.0) + -35.0); *(cocos2d::CCPoint *)&v93 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v90, (const cocos2d::CCPoint *)v31); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *, double))v25->setPosition)(v25, v90, v93); } v15 = LODWORD(v86); v16 = ((float (__fastcall *)(SetupItemCompareTriggerPopup *, _QWORD))v24->getValue)(v24, LODWORD(v86)); SetupItemCompareTriggerPopup::updateOpButton(v24, v25, (int)v16, v15); v12 = v14 + 50; v11 = v82; } while ( v82 != 6 ); sub_10028CBE0((float *)&v60, (float)(*(float *)&v85 * 0.5) + -80.0, (float)(0.5 * *((float *)&v85 + 1)) + -95.0); v94.origin = 0; v94.size = 0; sub_10028CC00((__int64)v90, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u); v27 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", v94); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v27->setOpacity)(v27, 50); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, void *))v27->setColor)(v27, &unk_10081EB24); sub_10028CBF0((float *)v90, 960.0, 88.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, double *))v27->setContentSize)(v27, v90); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))v24->m_mainLayer->addChild_0)( v24->m_mainLayer, v27, 1); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v27->setPosition)(v27, &v60); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float))v27->setScale)(v27, 0.25); v28 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt"); v24->m_formulaLabel = v28; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v24->m_mainLayer->addChild_0)( v24->m_mainLayer, v28, 2); m_formulaLabel = v24->m_formulaLabel; sub_10028CBE0((float *)&v30, 0.0, 1.0); sub_10028CCE0(v90, &v60, &v30); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))m_formulaLabel->setPosition)(m_formulaLabel, v90); SetupItemCompareTriggerPopup::updateFormulaLabel(v24); SetupTriggerPopup::postSetup(v24); return v88; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source