// // SetupGradientPopup::init from 0xb30ac0 to 0xb31830 (3440 bytes) // // 2 xrefs: // > SetupGradientPopup::create @ 0xb31ab4 // > @ 0x94ae0 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 13:01:43 +0000 // __int64 __fastcall SetupGradientPopup::init(cocos2d::CCArray **this, GradientTriggerObject *a2, cocos2d::CCArray *a3) { cocos2d::CCDirector *v5; // x0 cocos2d::CCDirector *v6; // x0 const char *v7; // x6 __int64 v8; // x0 __int64 v9; // x0 cocos2d::CCArray *v10; // x0 cocos2d::CCObject *v11; // x0 int v12; // w19 const char *v13; // x2 cocos2d::CCObject *v14; // x28 void (__fastcall *v15)(cocos2d::CCObject *, __int64 *); // x26 float v16; // s0 void (__fastcall *v17)(cocos2d::CCObject *, __int64 *); // x26 const char *v18; // x2 unsigned int v19; // w19 __int64 v20; // x26 void (__fastcall *v21)(__int64, __int64 *); // x27 const char *v22; // x2 __int64 v23; // x0 __int64 v24; // x27 __int64 v25; // x0 __int64 (__fastcall *v26)(__int64); // x1 void (__fastcall *v27)(__int64, __int64 *); // x26 __int64 v28; // x28 const char *v29; // x1 cocos2d::CCSprite *v30; // x26 __int64 v31; // x27 const char *v32; // x1 __int64 v33; // x28 __int64 v34; // x27 void (__fastcall *v35)(__int64, __int64 *); // x28 cocos2d::CCArray *MultiTriggerItemsCorner; // x0 cocos2d::CCObject *v37; // x0 cocos2d::CCArray *v38; // x0 int v39; // w1 const char *v40; // x6 ButtonSprite *v41; // x0 cocos2d::CCObject *v42; // x26 cocos2d::CCObject *v43; // x27 cocos2d::CCNode *v44; // x19 cocos2d::CCNode *v45; // x19 int v46; // [xsp+8h] [xbp-28h] int v47; // [xsp+8h] [xbp-28h] int v48; // [xsp+8h] [xbp-28h] int v49; // [xsp+8h] [xbp-28h] cocos2d::CCNode *v50; // [xsp+C0h] [xbp+90h] unsigned __int8 v51; // [xsp+CFh] [xbp+9Fh] cocos2d::CCArray *v52; // [xsp+D0h] [xbp+A0h] cocos2d::CCNode *v53; // [xsp+D0h] [xbp+A0h] cocos2d::CCArray *v54; // [xsp+D0h] [xbp+A0h] cocos2d::CCArray *v55; // [xsp+D8h] [xbp+A8h] cocos2d::CCArray *v56; // [xsp+D8h] [xbp+A8h] cocos2d::CCArray *v57; // [xsp+D8h] [xbp+A8h] __int64 v58; // [xsp+E0h] [xbp+B0h] BYREF _BYTE v59[8]; // [xsp+E8h] [xbp+B8h] BYREF _BYTE v60[8]; // [xsp+F0h] [xbp+C0h] BYREF _BYTE v61[8]; // [xsp+F8h] [xbp+C8h] BYREF _BYTE v62[8]; // [xsp+100h] [xbp+D0h] BYREF __int64 v63; // [xsp+108h] [xbp+D8h] BYREF __int64 v64; // [xsp+110h] [xbp+E0h] BYREF __int64 v65[2]; // [xsp+118h] [xbp+E8h] BYREF void *v66; // [xsp+128h] [xbp+F8h] cocos2d::CCArray *v67; // [xsp+130h] [xbp+100h] BYREF __int64 v68; // [xsp+138h] [xbp+108h] void *v69; // [xsp+140h] [xbp+110h] v51 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 420.0, 290.0, 1u, 0.0); if ( v51 ) { v5 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(cocos2d::CCArray **))*this + 170))(this); v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5); cocos2d::CCDirector::getWinSize(&v58, v6); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, "Setup Gradient Effect", 0x15u); SetupTriggerPopup::addTitle((__int64)this, (__int64)&v67); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v65[0] = 0; v65[1] = 0; v66 = nullptr; std::string::__init(v65, "Help", 4u); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init( (__int64 *)&v67, "Creates a gradient with set colors in a given area.\n" "U, D, L, and R must be set to a group at each side of the area.\n" "Use Vertex Mode to set corners of the area instead.\n" "Blending changes the gradient method.\n" "Use ID to give a gradient a unique identifier that can be used to disable it with another of these triggers.", 0x162u); SetupTriggerPopup::addHelpButton((__int64)this, (char *)v65, (char *)&v67, 1.0); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); if ( (v65[0] & 1) != 0 ) operator delete(v66); v8 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&qword_28, 0, 1, 0.8, "goldFont.fnt", "GJ_button_01.png", v7, 30.0); v9 = CCMenuItemSpriteExtra::create(v8, 0, (__int64)this, 1368, 1); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v9); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, *(float *)&v58 * 0.5, (float)(*((float *)&v58 + 1) * 0.5) + 85.0); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, &byte_11B8890, 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, -153.0, 0.0); cocos2d::CCPoint::operator+(&v64, v59); IDNameInput::create(this, this + 68, 1, 203, &v67, &v64, 6, 0, 0.58, 0, 1); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, &byte_11B8890, 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, -51.0, 0.0); cocos2d::CCPoint::operator+(&v64, v59); LOBYTE(v46) = 1; IDNameInput::create(this, this + 68, 1, 204, &v67, &v64, 6, 0, 0.58, 0, v46); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, &byte_11B8890, 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 51.0, 0.0); cocos2d::CCPoint::operator+(&v64, v59); LOBYTE(v47) = 1; IDNameInput::create(this, this + 68, 1, 205, &v67, &v64, 6, 0, 0.58, 0, v47); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, &byte_11B8890, 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 153.0, 0.0); cocos2d::CCPoint::operator+(&v64, v59); LOBYTE(v48) = 1; IDNameInput::create(this, this + 68, 1, 206, &v67, &v64, 6, 0, 0.58, 0, v48); v10 = (cocos2d::CCArray *)(unsigned __int8)v67; if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v11 = (cocos2d::CCObject *)cocos2d::CCArray::create(v10); *(this + 131) = v11; v12 = 0; cocos2d::CCObject::retain(v11); do { v14 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create( (cocos2d::CCLabelBMFont *)&byte_11E1A70, "goldFont.fnt", v13); v15 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v14 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v64, 0.5, 0.5); v15(v14, &v64); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(*(_QWORD *)*(this + 73) + 456LL))(*(this + 73), v14); (*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v14 + 160LL))(v14, 0.5); v16 = (float)v12++; v17 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v14 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, (float)(v16 - 1.5) * 102.0, 19.0); cocos2d::CCPoint::operator+(&v64, v59); v17(v14, &v64); cocos2d::CCArray::addObject(*(this + 131), v14); } while ( v12 != 4 ); SetupGradientPopup::updateGradientLabels(this, 0); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, "Vertex\nMode", 0xBu); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v64, (float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v58 * 0.5)) - 72.0, (float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v58 + 1) * 0.5)) - 20.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xCFu, &v67, (const cocos2d::CCPoint *)&v64, 0, 0, 0, 1.0); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v60, (float)(*(float *)&v58 * 0.5) + 145.0, (float)(*((float *)&v58 + 1) * 0.5) + 40.0); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, "Disable", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v64, (const cocos2d::CCPoint *)v60); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xD0u, &v67, (const cocos2d::CCPoint *)&v64, 0, 0, 0, 0.8); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, "Disable\nAll", 0xBu); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 0.0, -25.0); cocos2d::CCPoint::operator+(&v64, v60); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0x1FCu, &v67, (const cocos2d::CCPoint *)&v64, 0, 0, 0, 0.8); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, "Preview\nOpacity", 0xFu); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v64, (float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v58 * 0.5)) - 72.0, 40.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v58 + 1) * 0.5))); SetupTriggerPopup::createValueControlAdvanced( this, 456, (char *)&v67, (__int64)&v64, 0, 1, 5, 0, 0.65, 0.0, 0.0, 0, 0, 0, 2, 0); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v61, (float)(*(float *)&v58 * 0.5) + -20.0, (float)(*((float *)&v58 + 1) * 0.5) + 60.0); v67 = nullptr; v68 = 0; v69 = nullptr; std::string::__init((__int64 *)&v67, "Gradient ID", 0xBu); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 75.0, -25.0); cocos2d::CCPoint::operator+(&v64, v61); LOBYTE(v49) = 0; IDNameInput::create(this, this + 68, 7, 209, &v67, &v64, 6, 0, 0.7, 0, v49); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); v19 = 1; v20 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Blending", "goldFont.fnt", v18); v21 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, -85.0, 0.0); cocos2d::CCPoint::operator+(&v64, v61); v21(v20, &v64); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 73) + 456LL))(*(this + 73), v20); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 0.6); v23 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11E1A70, "bigFont.fnt", v22); *(this + 127) = (cocos2d::CCArray *)v23; (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 73) + 456LL))(*(this + 73), v23); v24 = (__int64)*(this + 127); v25 = v20; v26 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL); v27 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL); v28 = v26(v25); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 0.0, -25.0); cocos2d::CCPoint::operator+(&v64, v28); v27(v24, &v64); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*(this + 127) + 160LL))(*(this + 127), 0.5); SetupGradientPopup::updateBlendingLabel((SetupGradientPopup *)this); v30 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_arrow_01_001.png", v29); cocos2d::CCSprite::setFlipX(v30, 1); (*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v30 + 160LL))(v30, 0.6); v31 = CCMenuItemSpriteExtra::create((__int64)v30, 0, (__int64)this, (__int64)SetupGradientPopup::onBlending, 0); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v31); v52 = *(cocos2d::CCArray **)(*(_QWORD *)v31 + 184LL); v50 = *(this + 69); v55 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 127) + 192LL))(*(this + 127)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, 75.0, 0.0); cocos2d::CCPoint::operator+(&v63, v55); cocos2d::CCNode::convertToNodeSpace(&v64, v50, (const cocos2d::CCPoint *)&v63); ((void (__fastcall *)(__int64, __int64 *))v52)(v31, &v64); CCMenuItemSpriteExtra::setSizeMult(v31, 1.4); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v31 + 72LL))(v31, 1); v33 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v32); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v33 + 160LL))(v33, 0.6); v34 = CCMenuItemSpriteExtra::create(v33, 0, (__int64)this, (__int64)SetupGradientPopup::onBlending, 0); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v34); v53 = *(this + 69); v35 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v34 + 184LL); v56 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 127) + 192LL))(*(this + 127)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, -75.0, 0.0); cocos2d::CCPoint::operator+(&v63, v56); cocos2d::CCNode::convertToNodeSpace(&v64, v53, (const cocos2d::CCPoint *)&v63); v35(v34, &v64); CCMenuItemSpriteExtra::setSizeMult(v34, 1.4); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v34 + 72LL))(v34, 0); MultiTriggerItemsCorner = (cocos2d::CCArray *)SetupTriggerPopup::createMultiTriggerItemsCorner((SetupTriggerPopup *)this); v37 = (cocos2d::CCObject *)cocos2d::CCArray::create(MultiTriggerItemsCorner); *(this + 129) = v37; v38 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v37); v54 = (cocos2d::CCArray *)cocos2d::CCArray::create(v38); v57 = (cocos2d::CCArray *)cocos2d::CCArray::create(v54); do { while ( 1 ) { SetupShaderEffectPopup::zLayerToString((__int64 *)&v67, (SetupShaderEffectPopup *)v19, v39); v41 = (ButtonSprite *)((char *)&v67 + 1); if ( ((unsigned __int8)v67 & 1) != 0 ) v41 = (ButtonSprite *)v69; v42 = (cocos2d::CCObject *)ButtonSprite::create( v41, (const char *)&qword_D8 + 4, 0, 0, 0.3, "bigFont.fnt", "GJ_button_04.png", v40, 25.0); if ( ((unsigned __int8)v67 & 1) != 0 ) operator delete(v69); cocos2d::CCArray::addObject(*(this + 129), v42); v43 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( (__int64)v42, 0, (__int64)this, (__int64)SetupGradientPopup::onZLayer, 0); (*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v43 + 72LL))(v43, v19); (*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v42 + 72LL))(v42, v19); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v43); if ( (int)v19 <= 7 ) break; ++v19; cocos2d::CCArray::addObject(v57, v43); if ( v19 == 16 ) goto LABEL_37; } ++v19; cocos2d::CCArray::addObject(v54, v43); } while ( v19 != 16 ); LABEL_37: SetupGradientPopup::updateZLayerButtons(this); v44 = *(this + 69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v63, (float)(*(float *)&v58 * 0.5) + -20.0, (float)(*((float *)&v58 + 1) * 0.5) + -10.0); cocos2d::CCNode::convertToNodeSpace(&v64, v44, (const cocos2d::CCPoint *)&v63); GameToolbox::alignItemsHorisontally((__int64)v54, (__int64)&v64, 0, 8.0); v45 = *(this + 69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v63, (float)(*(float *)&v58 * 0.5) + -20.0, (float)(*((float *)&v58 + 1) * 0.5) + -50.0); cocos2d::CCNode::convertToNodeSpace(&v64, v45, (const cocos2d::CCPoint *)&v63); GameToolbox::alignItemsHorisontally((__int64)v57, (__int64)&v64, 0, 8.0); (*((void (__fastcall **)(cocos2d::CCArray **))*this + 179))(this); *((_BYTE *)this + 744) = 0; } return v51; }
GD Web Decomp Icon

GD Web Decomp

Raw Source