// // SetupSequenceTriggerPopup::init from 0xa58a04 to 0xa59a20 (4124 bytes) // // 2 xrefs: // > SetupSequenceTriggerPopup::create @ 0xa59c20 // > @ 0x4e930 // // 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 SetupSequenceTriggerPopup::init(SetupSequenceTriggerPopup *a1, SequenceTriggerGameObject *a2) { bool v3; // w27 cocos2d::CCArray *v5; // x0 cocos2d::CCDirector *v6; // x0 cocos2d::CCLabelBMFont *v7; // x22 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 const char *v9; // x6 cocos2d::CCNode *v10; // x0 CCMenuItemSpriteExtra *v11; // x0 cocos2d::CCNode *v12; // x23 void *v13; // x0 void *v14; // x0 void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float v16; // s3 float v17; // s4 void *v18; // x0 float v19; // s3 float v20; // s4 void *v21; // x0 cocos2d::CCMenu *v22; // x28 int v23; // w23 void (*v24)(SetupSequenceTriggerPopup *, cocos2d::CCObject *); // x24 double v25; // d0 cocos2d::CCSprite *v26; // x0 ButtonSprite *v27; // x28 cocos2d::CCNode *v28; // x0 CCMenuItemSpriteExtra *v29; // x24 cocos2d::CCMenu *v30; // x2 void (__fastcall *v31)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float *p_m_fBrVertexMod; // x0 char *v33; // x0 cocos2d::CCNode *v34; // x23 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x24 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 float v37; // s3 float v38; // s4 void *v39; // x0 float v40; // s3 float v41; // s4 void *v42; // x0 int v43; // w28 void *v44; // x0 void *v45; // x0 void *v46; // x0 void *v47; // x0 void *v48; // x0 void *v49; // x22 unsigned int *p_m_fTextureTop; // x1 int m_fTextureTop_low; // w2 unsigned int *v52; // x1 int v53; // w2 unsigned int *v54; // x1 int v55; // w2 unsigned int *v56; // x1 int v57; // w2 unsigned int *v58; // x1 int v59; // w2 unsigned int *v60; // x1 int v61; // w2 unsigned int *v62; // x1 int v63; // w2 unsigned int *v64; // x1 int v65; // w2 unsigned int *v66; // x1 int v67; // w2 unsigned int *v68; // x1 int v69; // w2 unsigned int *v70; // x1 int v71; // w2 unsigned int *v72; // x1 int v73; // w2 unsigned int *v74; // x19 int v75; // w0 unsigned int *v76; // x1 int v77; // w2 double v78; // d0 cocos2d::CCMenu *m_buttonMenu; // [xsp+C8h] [xbp+98h] int v80; // [xsp+C8h] [xbp+98h] float v81; // [xsp+E0h] [xbp+B0h] float v82; // [xsp+E4h] [xbp+B4h] cocos2d::CCPoint v83; // [xsp+E8h] [xbp+B8h] BYREF _BYTE v84[8]; // [xsp+F0h] [xbp+C0h] BYREF cocos2d::CCPoint v85; // [xsp+F8h] [xbp+C8h] BYREF const char *v86; // [xsp+100h] [xbp+D0h] BYREF cocos2d::CCSprite *v87; // [xsp+108h] [xbp+D8h] BYREF cocos2d::CCPoint v88; // [xsp+110h] [xbp+E0h] BYREF cocos2d::CCRect v89; // [xsp+118h] [xbp+E8h] BYREF cocos2d::CCPoint v90; // 0:kr08_8.8 cocos2d::SEL_MenuHandler v91; // 0:x2.16 cocos2d::SEL_MenuHandler v92; // 0:x2.16 cocos2d::CCPoint v93; // 0:s0.4,4:s1.4 cocos2d::CCPoint v94; // 0:s0.4,4:s1.4 cocos2d::CCPoint v95; // 0:s0.4,4:s1.4 cocos2d::CCPoint v96; // 0:s0.4,4:s1.4 cocos2d::CCRect v97; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v3 = SetupTriggerPopup::init(a1, a2, nullptr, 420.0, 300.0, 1); if ( v3 ) { SetupTriggerPopup::preSetup(a1); v5 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)&v85); a1->m_groupButtons = v5; cocos2d::CCObject::retain(v5); v6 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v6); v7 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v7); v7->setScale(v7, 0.7); setPosition = v7->setPosition; cocos2d::CCPoint::CCPoint(&v89.origin, v81 * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v82 * 0.5)) - 18.0); setPosition(v7, &v89.origin); v10 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&qword_28, 0, 1, 0.8, "goldFont.fnt", "GJ_button_01.png", v9, 30.0); v91.adj = 1320; v91.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v11 = CCMenuItemSpriteExtra::create(v10, nullptr, v91); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v11); sub_D153B8((int)&v88, "Help"); sub_D153B8( (int)&v89, "Activates a sequence of triggers. Every time it is called, the sequence is advanced one step.\n" "GroupID is called the amount of times given by Count.\n" "MinInt is the minimum interval between each step.\n" "Mode Stop stops the sequence at the end.\n" "Mode Loop restarts the sequence after ending.\n" "Mode Last calls last group after the end.\n" "Reset Full and Reset Step go back in the sequence if activation does not happen in a set time."); v12 = (cocos2d::CCNode *)InfoAlertButton::create(1.0); v13 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v64 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v65 = __ldaxr(v64); while ( __stlxr(v65 - 1, v64) ); } else { v65 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v65 - 1; } if ( v65 <= 0 ) operator delete(v13); } v14 = (void *)(*(_QWORD *)&v88 - 24LL); if ( (__int64 *)(*(_QWORD *)&v88 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v72 = (unsigned int *)(*(_QWORD *)&v88 - 8LL); do v73 = __ldaxr(v72); while ( __stlxr(v73 - 1, v72) ); } else { v73 = *(_DWORD *)(*(_QWORD *)&v88 - 8LL); *(_DWORD *)(*(_QWORD *)&v88 - 8LL) = v73 - 1; } if ( v73 <= 0 ) operator delete(v14); } a1->m_buttonMenu->addChild(a1->m_buttonMenu, v12); v15 = v12->setPosition; m_buttonMenu = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint( &v88, 18.0 - (float)((float)(a1->m_width * 0.5) - (float)(v81 * 0.5)), (float)((float)(a1->m_height * 0.5) + (float)(v82 * 0.5)) - 18.0); v90 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v88); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *, float, float))v15)(v12, &v89, v90.x, v90.y); cocos2d::CCPoint::CCPoint(&v83, (float)(v81 * 0.5) + -65.0, (float)(v82 * 0.5) + 82.0); sub_D153B8((int)&v89, "GroupID:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, -55.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v83, &v87); v93.x = 0.7; v93.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0xFFFFFFFF, v93, 100.0, v16, v17, (std::string)&v89, &v88, Float, Uint, 6, 1u, 0, 0, 0, 2, 0); v18 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v68 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v69 = __ldaxr(v68); while ( __stlxr(v69 - 1, v68) ); } else { v69 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v69 - 1; } if ( v69 <= 0 ) operator delete(v18); } sub_D153B8((int)&v89, "Count:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 55.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v83, &v87); v94.x = 0.7; v94.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0xFFFFFFFE, v94, 100.0, v19, v20, (std::string)&v89, &v88, Float, Int, 6, 1u, 0, 0, 0, 2, 0); v21 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v76 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v77 = __ldaxr(v76); while ( __stlxr(v77 - 1, v76) ); } else { v77 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v77 - 1; } if ( v77 <= 0 ) operator delete(v21); } v22 = a1->m_buttonMenu; v23 = 0; cocos2d::CCPoint::CCPoint(&v88, 130.0, 0.0); cocos2d::CCPoint::operator+(&v89, &v83, &v88); cocos2d::CCNode::convertToNodeSpace(v22, &v89.origin); do { v24 = SetupSequenceTriggerPopup::onAddChance; sub_D153B8((int)&v86, "edit_addCBtn_001.png"); sub_D153B8((int)&v87, "GJ_button_01.png"); if ( v23 == 1 ) { *(_QWORD *)&v78 = sub_D1798C(&v86, "edit_delCBtn_001.png", 20).n128_u64[0]; v24 = SetupSequenceTriggerPopup::onDeleteSelected; sub_D1798C(&v87, "GJ_button_06.png", 16, v78); } else if ( v23 > 1 ) { *(_QWORD *)&v25 = sub_D1798C(&v86, "edit_upBtn_001.png", 18).n128_u64[0]; v24 = SetupSequenceTriggerPopup::onChangeOrder; sub_D1798C(&v87, "GJ_button_05.png", 16, v25); } v26 = cocos2d::CCSprite::createWithSpriteFrameName(v86); v27 = (ButtonSprite *)v26; if ( v23 == 2 ) { v26->setRotation(v26, -90.0); } else if ( v23 == 3 ) { v26->setRotation(v26, 90.0); } v28 = (cocos2d::CCNode *)ButtonSprite::create( v27, (cocos2d::CCSprite *)&qword_20, 0, (bool)&dword_0 + 1, 32.0, 1.0, v87, (const char *)&dword_0 + 1); v92.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v92.adj = (size_t)v24; v29 = CCMenuItemSpriteExtra::create(v28, nullptr, v92); v29->setScale(v29, 0.6); v30 = a1->m_buttonMenu; v29->m_baseScale = 0.6; v30->addChild(v30, v29); v31 = v29->setPosition; cocos2d::CCPoint::CCPoint(&v88, (float)v23 * 32.0, 0.0); cocos2d::CCPoint::operator+(&v89, v84, &v88); v31(v29, &v89.origin); v29->setTag(v29, v23); p_m_fBrVertexMod = &v87[-1].m_fBrVertexMod; if ( (__int64 *)&v87[-1].m_fBrVertexMod != &qword_124B6B0 ) { if ( &pthread_create ) { p_m_fTextureTop = (unsigned int *)&v87[-1].m_fTextureTop; do m_fTextureTop_low = __ldaxr(p_m_fTextureTop); while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) ); } else { m_fTextureTop_low = LODWORD(v87[-1].m_fTextureTop); LODWORD(v87[-1].m_fTextureTop) = m_fTextureTop_low - 1; } if ( m_fTextureTop_low <= 0 ) operator delete(p_m_fBrVertexMod); } v33 = (char *)(v86 - 24); if ( v86 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v52 = (unsigned int *)(v86 - 8); do v53 = __ldaxr(v52); while ( __stlxr(v53 - 1, v52) ); } else { v53 = *((_DWORD *)v86 - 2); *((_DWORD *)v86 - 2) = v53 - 1; } if ( v53 <= 0 ) operator delete(v33); } ++v23; } while ( v23 != 4 ); cocos2d::CCRect::CCRect(&v89, 0.0, 0.0, 80.0, 80.0); v34 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02_001.png", (const char *)&v89, v97); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v34->__vftable[1].~CCNode_0)(v34, 50); setContentSize = v34->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v89, 370.0, 90.0); setContentSize(v34, (const cocos2d::CCSize *)&v89); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v34, -1); v36 = v34->setPosition; cocos2d::CCPoint::CCPoint(&v89.origin, v81 * 0.5, (float)(v82 * 0.5) + 14.0); v36(v34, &v89.origin); cocos2d::CCPoint::CCPoint(&v85, v81 * 0.5, (float)(v82 * 0.5) + -50.0); sub_D153B8((int)&v89, "MinInt:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, -91.0, -0.0); cocos2d::CCPoint::operator+(&v88, &v85, &v87); v95.y = 0.0; v95.x = 0.65; SetupTriggerPopup::createValueControlAdvanced( a1, 0x1B5u, v95, 1.0, v37, v38, (std::string)&v89, &v88, (InputValueType)0, Float, 6, 0, 0, 0, 1, 2, 0); v39 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v66 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v67 = __ldaxr(v66); while ( __stlxr(v67 - 1, v66) ); } else { v67 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v67 - 1; } if ( v67 <= 0 ) operator delete(v39); } sub_D153B8((int)&v89, "Reset:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 91.0, -0.0); cocos2d::CCPoint::operator+(&v88, &v85, &v87); v96.x = 0.65; v96.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x1B6u, v96, 1.0, v40, v41, (std::string)&v89, &v88, (InputValueType)0, Float, 6, 0, 0, 0, 1, 2, 0); v42 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v60 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v61 = __ldaxr(v60); while ( __stlxr(v61 - 1, v60) ); } else { v61 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v61 - 1; } if ( v61 <= 0 ) operator delete(v42); } cocos2d::CCPoint::CCPoint(&v89.origin, -25.0, -34.0); cocos2d::CCPoint::operator+(&v86, &v85, &v89); v43 = (int)a1->getValue(a1, 436); v80 = (int)a1->getValue(a1, 439); sub_D153B8((int)&v89, "Mode\nStop"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, -158.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v86, &v87); SetupTriggerPopup::createCustomToggleValueControl(a1, 0, v43 == 0, 1u, (int)&v89, &v88, 0, 0, 0); v44 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v70 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v71 = __ldaxr(v70); while ( __stlxr(v71 - 1, v70) ); } else { v71 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v71 - 1; } if ( v71 <= 0 ) operator delete(v44); } sub_D153B8((int)&v89, "Mode\nLoop"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, -79.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v86, &v87); SetupTriggerPopup::createCustomToggleValueControl(a1, 1, v43 == 1, 1u, (int)&v89, &v88, 0, 0, 0); v45 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v54 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v55 = __ldaxr(v54); while ( __stlxr(v55 - 1, v54) ); } else { v55 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v55 - 1; } if ( v55 <= 0 ) operator delete(v45); } sub_D153B8((int)&v89, "Mode\nLast"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 0.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v86, &v87); SetupTriggerPopup::createCustomToggleValueControl(a1, 2, v43 == 2, 1u, (int)&v89, &v88, 0, 0, 0); v46 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v56 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v57 = __ldaxr(v56); while ( __stlxr(v57 - 1, v56) ); } else { v57 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v57 - 1; } if ( v57 <= 0 ) operator delete(v46); } sub_D153B8((int)&v89, "Reset\nFull"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 79.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v86, &v87); SetupTriggerPopup::createCustomToggleValueControl(a1, 100, v80 != 1, 1u, (int)&v89, &v88, 0, 0, 0); v47 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v58 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v59 = __ldaxr(v58); while ( __stlxr(v59 - 1, v58) ); } else { v59 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v59 - 1; } if ( v59 <= 0 ) operator delete(v47); } sub_D153B8((int)&v89, "Reset\nStep"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 158.0, 0.0); cocos2d::CCPoint::operator+(&v88, &v86, &v87); SetupTriggerPopup::createCustomToggleValueControl(a1, 101, v80 == 1, 1u, (int)&v89, &v88, 0, 0, 0); v48 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v62 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v63 = __ldaxr(v62); while ( __stlxr(v63 - 1, v62) ); } else { v63 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v63 - 1; } if ( v63 <= 0 ) operator delete(v48); } sub_D153B8((int)&v89, "Unique\nRemap"); cocos2d::CCPoint::CCPoint( &v88, (float)(v81 * 0.5) + 55.0, 20.0 - (float)((float)(a1->m_height * 0.5) - (float)(v82 * 0.5))); SetupTriggerPopup::createToggleValueControl(a1, 505, 1.0, (__int64)&v89, &v88, 0, 0, 0); v49 = (void *)(*(_QWORD *)&v89.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v89.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v74 = (unsigned int *)(*(_QWORD *)&v89.origin - 8LL); do v75 = __ldaxr(v74); while ( __stlxr(v75 - 1, v74) ); } else { v75 = *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v89.origin - 8LL) = v75 - 1; } if ( v75 <= 0 ) operator delete(v49); } SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1); SetupSequenceTriggerPopup::updateGroupIDButtons(a1); SetupTriggerPopup::postSetup(a1); SetupTriggerPopup::updateValue(a1, -2, 1.0); } return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source