//
// SetupOpacityPopup::init from 0x5e9844 to 0x5e9e48 (1540 bytes)
//
// 1 xrefs:
// > SetupOpacityPopup::create @ 0x5ea080
//
// 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:54:22 +0000
//
int __fastcall SetupOpacityPopup::init(SetupOpacityPopup *this, EffectGameObject *a2, cocos2d::CCArray *a3)
{
int v4; // r10
cocos2d::CCDirector *v5; // r0
ButtonSprite *v6; // r0
int v7; // r0
int v8; // r8
const cocos2d::CCPoint *v9; // r11
void (__fastcall *v10)(int, _DWORD *); // r9
int v11; // r6
const char *v12; // r2
int v13; // r7
void (__fastcall *v14)(int, _DWORD *); // r9
int v15; // r7
char *v16; // r2
int *v17; // r0
int v18; // r0
int v19; // r7
int v20; // r0
int v21; // r9
void (__fastcall *v22)(int, _DWORD *); // r11
float v23; // s15
int Thumb; // r0
const char *v25; // r2
int v26; // r0
int v27; // r8
void (__fastcall *v28)(int, _DWORD *); // r9
int v29; // r0
int v30; // r6
void (__fastcall *v31)(int, _BYTE *); // r9
int v32; // r11
int v33; // r0
const char *v34; // r1
char *v36; // [sp+8h] [bp-ACh]
int v37; // [sp+10h] [bp-A4h]
void (__fastcall *v38)(int, _DWORD *); // [sp+28h] [bp-8Ch]
void (__fastcall *v39)(int, int); // [sp+28h] [bp-8Ch]
int v40; // [sp+2Ch] [bp-88h]
int v41; // [sp+30h] [bp-84h]
float v42; // [sp+34h] [bp-80h] BYREF
float v43; // [sp+38h] [bp-7Ch]
_BYTE v44[8]; // [sp+3Ch] [bp-78h] BYREF
_BYTE v45[8]; // [sp+44h] [bp-70h] BYREF
_BYTE v46[8]; // [sp+4Ch] [bp-68h] BYREF
_BYTE v47[8]; // [sp+54h] [bp-60h] BYREF
_BYTE v48[8]; // [sp+5Ch] [bp-58h] BYREF
int v49; // [sp+64h] [bp-50h]
int v50; // [sp+68h] [bp-4Ch]
_DWORD v51[2]; // [sp+6Ch] [bp-48h] BYREF
int v52[3]; // [sp+74h] [bp-40h] BYREF
int v53; // [sp+80h] [bp-34h] BYREF
int v54; // [sp+84h] [bp-30h]
int v55; // [sp+88h] [bp-2Ch]
_BYTE v56[16]; // [sp+8Ch] [bp-28h] BYREF
_DWORD v57[4]; // [sp+9Ch] [bp-18h] BYREF
v4 = SetupTriggerPopup::init(this, a2, a3, 360.0, 290.0, 1, 0.0);
if ( v4 )
{
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(SetupOpacityPopup *))(*(_DWORD *)this + 680))(this);
cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v42);
v53 = 0;
v54 = 0;
v55 = 0;
std::string::__init(&v53, "Setup Opacity Effect", 0x14u);
SetupTriggerPopup::addTitle(this, &v53);
std::string::~string((int)&v53);
v6 = ButtonSprite::create(
(ButtonSprite *)"OK",
(const char *)&word_28,
0,
0.8,
1,
"goldFont.fnt",
"GJ_button_01.png",
(const char *)0x41F00000,
*(float *)&v37);
v49 = 684;
v50 = 1;
v7 = CCMenuItemSpriteExtra::create((int)v6, 0, (int)this, 684, 1);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v7);
memset(v52, 0, sizeof(v52));
std::string::__init(v52, "Help", 4u);
v53 = 0;
v54 = 0;
v55 = 0;
std::string::__init(
&v53,
"Changes the opacity of a group. If any objects in the group have a color channel with opacity, the values are multiplied.",
0x81u);
v8 = InfoAlertButton::create((char *)v52, (int)&v53, 1065353216);
std::string::~string((int)&v53);
std::string::~string((int)v52);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v8);
v9 = *((const cocos2d::CCPoint **)this + 111);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v8 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v56,
(float)((float)(v42 * 0.5) - (float)(*((float *)this + 139) * 0.5)) + 18.0,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v43 * 0.5)) - 18.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v57, v9);
v10(v8, v57);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, v42 * 0.5, (float)(v43 * 0.5) + 65.0);
v53 = 0;
v54 = 0;
v55 = 0;
std::string::__init(&v53, "Group ID", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, (const cocos2d::CCPoint *)v44);
v11 = IDNameInput::create((int)this, (int)this + 440, 1, 3, (int)&v53, (int)v57, 1.0, 6, 0, 0, 0);
std::string::~string((int)&v53);
if ( v11 )
v11 = *(_DWORD *)(v11 + 300);
*((_DWORD *)this + 178) = v11;
SetupOpacityPopup::updateTextInputLabel(this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, v42 * 0.5, (float)(v43 * 0.5) + 20.0);
v13 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Fade Time: ", "goldFont.fnt", v12);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v13 + 80))(v13, 1060320051);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 92))(v13, v45);
v14 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v13 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, 1.0, 0.5);
v14(v13, v57);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v13);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v56, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v57, (const cocos2d::CCRect *)v56);
v15 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v57);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 456))(v15, 100);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v46, 70.0, 30.0);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 160))(v15, v46);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v15, -1);
v38 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v51, 45.0, 0.0);
cocos2d::CCPoint::operator+(v57, v45, v51);
v38(v15, v57);
if ( *((float *)this + 184) == -99999.0 )
v16 = "Mixed";
else
v16 = "Num";
v17 = CCTextInputNode::create(
(CCTextInputNode *)0x42480000,
40.0,
v16,
"Thonburi",
(const char *)&dword_18,
"bigFont.fnt",
v36);
*((_DWORD *)this + 179) = v17;
(*(void (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v17, 20);
v40 = *((_DWORD *)this + 179);
v39 = *(void (__fastcall **)(int, int))(*(_DWORD *)v40 + 92);
v18 = (*(int (__fastcall **)(int))(*(_DWORD *)v15 + 96))(v15);
v39(v40, v18);
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 179), 0.6);
CCTextInputNode::setMaxLabelWidth(*((_DWORD *)this + 179), 200.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 179) + 416) + 172))(
*(_DWORD *)(*((_DWORD *)this + 179) + 416),
0);
*(_DWORD *)(*((_DWORD *)this + 179) + 424) = 4;
v19 = *((_DWORD *)this + 179);
v53 = 0;
v54 = 0;
v55 = 0;
std::string::__init(&v53, "0123456789.", 0xBu);
CCTextInputNode::setAllowedChars(v19, (unsigned __int8 *)&v53);
std::string::~string((int)&v53);
LOWORD(v41) = -21896;
BYTE2(v41) = -16;
CCTextInputNode::setLabelPlaceholderColor(*((_DWORD *)this + 179), v41);
CCTextInputNode::setLabelPlaceholderScale(*((_DWORD *)this + 179), 0.5);
*(_BYTE *)(*((_DWORD *)this + 179) + 324) = 1;
*(_DWORD *)(*((_DWORD *)this + 179) + 420) = (char *)this + 440;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 179) + 36))(*((_DWORD *)this + 179), 4);
v51[0] = SetupOpacityPopup::sliderChanged;
v51[1] = 0;
v20 = Slider::create((int)this, (int)SetupOpacityPopup::sliderChanged, 0, 0.8);
*((_DWORD *)this + 181) = v20;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v20);
v21 = *((_DWORD *)this + 181);
v22 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v21 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v48, 0.0, -32.0);
cocos2d::CCPoint::operator+(v57, v45, v48);
v22(v21, v57);
v23 = *((float *)this + 184) / 10.0;
if ( v23 >= 1.0 )
{
v23 = 1.0;
}
else if ( v23 <= 0.0 )
{
v23 = 0.0;
}
Slider::setValue(*((Slider **)this + 181), v23);
Thumb = Slider::getThumb(*((Slider **)this + 181));
(*(void (__fastcall **)(int, int))(*(_DWORD *)Thumb + 36))(Thumb, 1);
SetupOpacityPopup::updateDurLabel(this, nullptr);
v26 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "goldFont.fnt", v25);
*((_DWORD *)this + 180) = v26;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v26);
v27 = *((_DWORD *)this + 180);
v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, v42 * 0.5, (float)(v43 * 0.5) - 40.0);
v28(v27, v57);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 180) + 80))(*((_DWORD *)this + 180), 1061997773);
v57[0] = SetupOpacityPopup::sliderChanged;
v57[1] = 0;
v29 = Slider::create((int)this);
*((_DWORD *)this + 182) = v29;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v29);
v30 = *((_DWORD *)this + 182);
v31 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v30 + 92);
v32 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 180) + 96))(*((_DWORD *)this + 180));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 0.0, -23.0);
cocos2d::CCPoint::operator+(v48, v32, v47);
v31(v30, v48);
v33 = Slider::getThumb(*((Slider **)this + 182));
(*(void (__fastcall **)(int, int))(*(_DWORD *)v33 + 36))(v33, 2);
SetupOpacityPopup::updateOpacityLabel(this, v34);
Slider::setValue(*((Slider **)this + 182), *((float *)this + 183));
SetupTriggerPopup::createMultiTriggerItemsDefault(this);
*((_BYTE *)this + 568) = 0;
}
return v4;
}