// // SetupRandAdvTriggerPopup::init from 0x65c17c to 0x65c99a (2078 bytes) // // 1 xrefs: // > SetupRandAdvTriggerPopup::create @ 0x65cbbc // // 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:55:34 +0000 // cocos2d::CCArray *__fastcall SetupRandAdvTriggerPopup::init( SetupRandAdvTriggerPopup *this, RandTriggerGameObject *a2, cocos2d::CCArray *a3) { cocos2d::CCArray *v4; // r0 cocos2d::CCObject *v5; // r0 cocos2d::CCDirector *v6; // r0 ButtonSprite *v7; // r0 int v8; // r0 int v9; // r8 const cocos2d::CCPoint *v10; // r11 void (__fastcall *v11)(int, _DWORD *); // r10 int v12; // r7 const char *v13; // r2 int v14; // r9 void (__fastcall *v15)(int, _DWORD *); // r8 void (__fastcall *v16)(int, _DWORD *); // r11 int v17; // r6 void (__fastcall *v18)(int, _DWORD *); // r9 int *v19; // r0 int v20; // r7 void (__fastcall *v21)(int, int); // r8 int v22; // r0 int v23; // r6 int v24; // r6 cocos2d::CCString *v25; // r0 const char *CString; // r0 const char *v27; // r7 size_t v28; // r0 ButtonSprite *v29; // r0 int v30; // r8 void (__fastcall *v31)(int, _DWORD *); // r11 int v32; // r6 int v33; // r8 void (__fastcall *v34)(int, _DWORD *); // r11 void (__fastcall *v35)(int, _DWORD *); // r11 const cocos2d::CCPoint *v36; // r11 const char *v37; // r1 cocos2d::CCSprite *v38; // r9 int v39; // r0 void (__fastcall *v40)(cocos2d::CCPoint *, _DWORD *); // r10 const char *v41; // r1 int v42; // r6 int v43; // r0 int v44; // r6 void (__fastcall *v45)(int, _BYTE *); // r11 char *v47; // [sp+8h] [bp-BCh] float v48; // [sp+10h] [bp-B4h] float v49; // [sp+10h] [bp-B4h] cocos2d::CCArray *v50; // [sp+24h] [bp-A0h] cocos2d::CCPoint *v51; // [sp+2Ch] [bp-98h] cocos2d::CCPoint *v52; // [sp+2Ch] [bp-98h] int v53; // [sp+30h] [bp-94h] float v54; // [sp+34h] [bp-90h] BYREF float v55; // [sp+38h] [bp-8Ch] _BYTE v56[8]; // [sp+3Ch] [bp-88h] BYREF _BYTE v57[8]; // [sp+44h] [bp-80h] BYREF _BYTE v58[8]; // [sp+4Ch] [bp-78h] BYREF char v59[4]; // [sp+54h] [bp-70h] BYREF float v60; // [sp+58h] [bp-6Ch] _BYTE v61[8]; // [sp+5Ch] [bp-68h] BYREF _BYTE v62[8]; // [sp+64h] [bp-60h] BYREF _BYTE v63[8]; // [sp+6Ch] [bp-58h] BYREF _BYTE v64[8]; // [sp+74h] [bp-50h] BYREF int v65; // [sp+7Ch] [bp-48h] int v66; // [sp+80h] [bp-44h] _DWORD (*v67)(SetupRandAdvTriggerPopup *__hidden, cocos2d::CCObject *); // [sp+84h] [bp-40h] int v68; // [sp+88h] [bp-3Ch] _DWORD v69[2]; // [sp+8Ch] [bp-38h] BYREF int v70[3]; // [sp+94h] [bp-30h] BYREF int v71; // [sp+A0h] [bp-24h] BYREF int v72; // [sp+A4h] [bp-20h] int v73; // [sp+A8h] [bp-1Ch] _DWORD v74[4]; // [sp+ACh] [bp-18h] BYREF v4 = (cocos2d::CCArray *)SetupTriggerPopup::init(this, a2, a3, 380.0, 300.0, 1, 0.0); v50 = v4; if ( v4 ) { v5 = (cocos2d::CCObject *)cocos2d::CCArray::create(v4); *((_DWORD *)this + 179) = v5; cocos2d::CCObject::retain(v5); v6 = (cocos2d::CCDirector *)(*(int (__fastcall **)(SetupRandAdvTriggerPopup *))(*(_DWORD *)this + 680))(this); cocos2d::CCDirector::sharedDirector(v6); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v54); v71 = 0; v72 = 0; v73 = 0; std::string::__init(&v71, "Advanced Random Trigger", 0x17u); SetupTriggerPopup::addTitle(this, &v71); std::string::~string((int)&v71); v7 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&word_28, 0, 0.8, 1, "goldFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), v48); v65 = 684; v66 = 1; v8 = CCMenuItemSpriteExtra::create((int)v7, 0, (int)this, 684, 1); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v8); memset(v70, 0, sizeof(v70)); std::string::__init(v70, "Help", 4u); v71 = 0; v72 = 0; v73 = 0; std::string::__init( &v71, "Triggers one of several groups randomly. Chance is how likely it is that the group is triggered. T" "his value is then divided by the sum of the chances to calculate the chance in percentage for each group.", 0xDBu); v9 = InfoAlertButton::create((char *)v70, (int)&v71, 1065353216); std::string::~string((int)&v71); std::string::~string((int)v70); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v9); v10 = *((const cocos2d::CCPoint **)this + 111); v11 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v69, (float)((float)(v54 * 0.5) - (float)(*((float *)this + 139) * 0.5)) + 18.0, (float)((float)(*((float *)this + 140) * 0.5) + (float)(v55 * 0.5)) - 18.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v74, v10); v11(v9, v74); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v56, (float)((float)(v54 * 0.5) - 50.0) - 50.0, (float)(v55 * 0.5) + 65.0); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v57, (float)((float)((float)(v54 * 0.5) + 50.0) - 50.0) + 35.0, (float)(v55 * 0.5) + 65.0); v71 = 0; v72 = 0; v73 = 0; std::string::__init(&v71, "GroupID", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, (const cocos2d::CCPoint *)v56); v12 = IDNameInput::create((int)this, (int)this + 440, 1, 1, (int)&v71, (int)v74, 1.0, 6, 0, 0, 0); std::string::~string((int)&v71); if ( v12 ) v12 = *(_DWORD *)(v12 + 300); *((_DWORD *)this + 180) = v12; v14 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Chance", "goldFont.fnt", v13); (*(void (__fastcall **)(int, int))(*(_DWORD *)v14 + 80))(v14, 1060320051); v15 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v14 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, 0.5, 0.0); v15(v14, v74); v16 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v14 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, 0.0, 25.0); cocos2d::CCPoint::operator+(v74, v57, v69); v16(v14, v74); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v14); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v74, 0.0, 0.0, 40.0, 40.0); v17 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v74); (*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 456))(v17, 100); v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v74, 70.0, 30.0); v18(v17, v74); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v17, -1); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92))(v17, v57); v19 = CCTextInputNode::create( (CCTextInputNode *)0x42700000, 40.0, "Num", "Thonburi", (const char *)&dword_18, "bigFont.fnt", v47); *((_DWORD *)this + 181) = v19; (*(void (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v19, 20); v20 = *((_DWORD *)this + 181); v21 = *(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 92); v22 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17); v21(v20, v22); CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 181), 0.6); CCTextInputNode::setMaxLabelWidth(*((_DWORD *)this + 181), 200.0); (*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 181) + 416) + 172))( *(_DWORD *)(*((_DWORD *)this + 181) + 416), 0); *(_DWORD *)(*((_DWORD *)this + 181) + 424) = 5; v23 = *((_DWORD *)this + 181); v71 = 0; v72 = 0; v73 = 0; std::string::__init(&v71, "0123456789", 0xAu); CCTextInputNode::setAllowedChars(v23, (unsigned __int8 *)&v71); std::string::~string((int)&v71); LOWORD(v53) = -21896; BYTE2(v53) = -16; CCTextInputNode::setLabelPlaceholderColor(*((_DWORD *)this + 181), v53); CCTextInputNode::setLabelPlaceholderScale(*((_DWORD *)this + 181), 0.5); *(_DWORD *)(*((_DWORD *)this + 181) + 420) = (char *)this + 440; *(_BYTE *)(*((_DWORD *)this + 181) + 324) = 1; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 181) + 36))(*((_DWORD *)this + 181), 2); v24 = *((_DWORD *)this + 181); v25 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", &byte_9[1]); CString = (const char *)cocos2d::CCString::getCString(v25); v71 = 0; v72 = 0; v73 = 0; v27 = CString; v28 = strlen(CString); std::string::__init(&v71, v27, v28); CCTextInputNode::setString(v24, (int)&v71); std::string::~string((int)&v71); v29 = ButtonSprite::create( (ButtonSprite *)"Add", (const char *)&word_32, 0, 0.7, 1, "goldFont.fnt", "GJ_button_04.png", (const char *)0x41C80000, v49); v67 = SetupRandAdvTriggerPopup::onAddChance; v68 = 0; v30 = CCMenuItemSpriteExtra::create((int)v29, 0, (int)this, (int)SetupRandAdvTriggerPopup::onAddChance, 0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v30); v31 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v30 + 92); v51 = *((cocos2d::CCPoint **)this + 111); v32 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 181) + 96))(*((_DWORD *)this + 181)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, 95.0, 0.0); cocos2d::CCPoint::operator+(v69, v32, v64); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v74, v51); v31(v30, v74); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v74, 0.0, 0.0, 80.0, 80.0); v33 = cocos2d::extension::CCScale9Sprite::create("square02_001.png", v74); (*(void (__fastcall **)(int, int))(*(_DWORD *)v33 + 456))(v33, 50); v34 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v33 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v74, 350.0, 90.0); v34(v33, v74); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v33, -1); v35 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v33 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, v54 * 0.5, (float)(v55 * 0.5) - 10.0); v35(v33, v74); v36 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, (float)(v54 * 0.5) - 175.0, (float)(v55 * 0.5) - 10.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v58, v36); v38 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_arrow_03_001.png", v37); (*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v38 + 80))(v38, 1056964608); cocos2d::CCSprite::setFlipY(v38, 1); (*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v38 + 180))(v38, 1119092736); v69[0] = SetupRandAdvTriggerPopup::onGroupIDScrollUp; v69[1] = 0; v39 = CCMenuItemSpriteExtra::create((int)v38, 0, (int)this, (int)SetupRandAdvTriggerPopup::onGroupIDScrollUp, 0); *((_DWORD *)this + 184) = v39; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v39); v52 = *((cocos2d::CCPoint **)this + 184); v40 = *(void (__fastcall **)(cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v52 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, 0.0, 20.0); cocos2d::CCPoint::operator+(v74, v58, v64); v40(v52, v74); CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 184), 1.5); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 184) + 172))(*((_DWORD *)this + 184), 0); v42 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v41); (*(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 80))(v42, 1056964608); (*(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 180))(v42, -1028390912); v74[0] = SetupRandAdvTriggerPopup::onGroupIDScrollDown; v74[1] = 0; v43 = CCMenuItemSpriteExtra::create(v42, 0, (int)this, (int)SetupRandAdvTriggerPopup::onGroupIDScrollDown, 0); *((_DWORD *)this + 185) = v43; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v43); v44 = *((_DWORD *)this + 185); v45 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v44 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v63, 0.0, -20.0); cocos2d::CCPoint::operator+(v64, v58, v63); v45(v44, v64); CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 185), 1.5); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 185) + 172))(*((_DWORD *)this + 185), 0); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v59, (float)((float)(v54 * 0.5) - (float)(*((float *)this + 139) * 0.5)) + 20.0, (float)((float)(v55 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 20.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 0.0, 30.0); cocos2d::CCPoint::operator+(v62, v59, v61); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (const cocos2d::CCPoint *)v59); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v63, (float)((float)(*((float *)this + 139) * 0.5) + (float)(v54 * 0.5)) - 76.0, v60 + 30.0); SetupTriggerPopup::createMultiTriggerItems(this, v62, v64, v63); SetupRandAdvTriggerPopup::updateGroupIDButtons((cocos2d::CCArray **)this); *((_BYTE *)this + 568) = 0; } return v50; }
GD Web Decomp Icon

GD Web Decomp

Raw Source