//
// CustomizeObjectSettingsPopup::init from 0x1400aa100 to 0x1400aa4a6 (934 bytes)
//
// 2 xrefs:
// > CustomizeObjectLayer::onSettings @ 0x1400a82b5
// > ??> @ 0x1406c7914
//
// 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
//
// Hidden C++ exception states: #wind=3
bool CustomizeObjectSettingsPopup::init(
CustomizeObjectSettingsPopup *a1,
GameObject *a2,
cocos2d::CCArray *a3,
CustomizeObjectLayer *a4)
{
bool result; // al
__int64 v7; // rcx
cocos2d::CCDirector *v8; // rax
int v9; // ebx
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
int v14; // r8d
int v15; // r9d
__int128 *v16; // [rsp+50h] [rbp-19h] BYREF
__int128 v17; // [rsp+58h] [rbp-11h] BYREF
__int64 v18; // [rsp+68h] [rbp-1h]
__int64 v19; // [rsp+70h] [rbp+7h]
cocos2d::CCPoint v20; // [rsp+78h] [rbp+Fh] BYREF
__int128 v21; // [rsp+80h] [rbp+17h] BYREF
__int64 v22; // [rsp+90h] [rbp+27h]
__int64 v23; // [rsp+98h] [rbp+2Fh]
float v24; // [rsp+A0h] [rbp+37h]
float v25; // [rsp+A4h] [rbp+3Bh]
__int128 *v26; // [rsp+A8h] [rbp+3Fh] BYREF
__int128 *v27; // [rsp+B0h] [rbp+47h] BYREF
result = SetupTriggerPopup::init(a1, (EffectGameObject *)a2, a3, 320.0, 200.0, 1);
if ( result )
{
a1->m_customizeLayer = a4;
a1->m_disableTextDelegate = 1;
a1->determineStartValues(a1);
v18 = 8;
v19 = 15;
v17 = 0x73676E6974746553uLL;
SetupTriggerPopup::addTitle(a1, &v17);
v17 = 0;
v18 = 2;
v19 = 15;
strcpy((char *)&v17, "OK");
SetupTriggerPopup::addCloseButton(a1, &v17);
v16 = &v17;
v17 = 0;
v18 = 0;
v19 = 15;
*(_QWORD *)&v17 = sub_14003AA10(0x50u);
v18 = 67;
v19 = 79;
strcpy((char *)v17, "Change if a single color object is treated as base or detail color.");
v21 = 0;
v22 = 4;
v23 = 15;
strcpy((char *)&v21, "Help");
SetupTriggerPopup::addHelpButton(a1, &v21, &v17);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8);
cocos2d::CCPoint::CCPoint(&v20, v24 * 0.5, (float)(v25 * 0.5) + 10.0);
v9 = (int)a1->getValue(a1, 497);
v26 = &v17;
HIWORD(v17) = 0;
v18 = 7;
v19 = 15;
qmemcpy(&v17, "Defaul", 6);
*(_QWORD *)((char *)&v17 + 6) = (unsigned __int8)aDefault[6];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v27, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v16);
LOBYTE(v10) = v9 == 0;
SetupTriggerPopup::createCustomToggleValueControl((_DWORD)a1, 0, v10, v11, (__int64)&v17, (__int64)&v16, 1, 0, 0);
v27 = &v21;
v21 = 0;
v22 = 4;
v23 = 15;
strcpy((char *)&v21, "Base");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v16);
LOBYTE(v12) = v9 == 1;
SetupTriggerPopup::createCustomToggleValueControl((_DWORD)a1, 1, v12, v13, (__int64)&v21, (__int64)&v16, 1, 0, 0);
v27 = &v17;
v17 = 0;
v18 = 6;
v19 = 15;
strcpy((char *)&v17, "Detail");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v16);
LOBYTE(v14) = v9 == 2;
SetupTriggerPopup::createCustomToggleValueControl((_DWORD)a1, 2, v14, v15, (__int64)&v17, (__int64)&v16, 1, 0, 0);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}