//
// SetupAreaTriggerPopup::init from 0x1404108c0 to 0x140410e5f (1439 bytes)
//
// 2 xrefs:
// > EditorUI::editObject @ 0x14011cc62
// > ??> @ 0x1406d8cb4
//
// 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 SetupAreaTriggerPopup::init(SetupAreaTriggerPopup *a1, EnterEffectObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
_QWORD *v5; // r9
_QWORD *v6; // rcx
const char *v7; // rdx
__int64 v8; // r8
double v9; // xmm0_8
__int64 v10; // rcx
cocos2d::CCDirector *v11; // rax
int v12; // r8d
char v13; // [rsp+80h] [rbp-88h]
__int64 v14; // [rsp+80h] [rbp-88h]
__int64 v15; // [rsp+80h] [rbp-88h]
__int64 v16; // [rsp+80h] [rbp-88h]
float v17; // [rsp+88h] [rbp-80h]
_QWORD v18[2]; // [rsp+90h] [rbp-78h] BYREF
__int128 *v19; // [rsp+A0h] [rbp-68h]
__int128 v20; // [rsp+A8h] [rbp-60h] BYREF
__int64 v21; // [rsp+B8h] [rbp-50h]
__int64 v22; // [rsp+C0h] [rbp-48h]
__int128 v23; // [rsp+C8h] [rbp-40h] BYREF
__int64 v24; // [rsp+D8h] [rbp-30h]
__int64 v25; // [rsp+E0h] [rbp-28h]
char v26; // [rsp+150h] [rbp+48h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 420.0, 280.0, 1);
if ( result )
{
a1->determineStartValues(a1);
v21 = 12;
v22 = 15;
strcpy((char *)&v20, "Area Trigger");
BYTE13(v20) = 0;
HIWORD(v20) = 0;
SetupTriggerPopup::addTitle(a1, &v20);
v20 = 0;
v21 = 2;
v22 = 15;
strcpy((char *)&v20, "OK");
SetupTriggerPopup::addCloseButton(a1, &v20);
v18[0] = &v20;
v20 = 0;
v21 = 0;
v22 = 15;
v5 = sub_14003AA10(0x140u);
*(_QWORD *)&v20 = v5;
v21 = 318;
v22 = 319;
v6 = v5;
v7 = "Alters objects using Target Group ID within an area around Center Group ID. The area can be spe"
"cified by the arrow buttons and Length (for size).\n"
"You can specify how much the objects in the area are altered depending on how close they are to the center.\n"
"Check the other pages for more settings.";
v8 = 2;
do
{
*(_OWORD *)v6 = *(_OWORD *)v7;
*((_OWORD *)v6 + 1) = *((_OWORD *)v7 + 1);
*((_OWORD *)v6 + 2) = *((_OWORD *)v7 + 2);
*((_OWORD *)v6 + 3) = *((_OWORD *)v7 + 3);
*((_OWORD *)v6 + 4) = *((_OWORD *)v7 + 4);
*((_OWORD *)v6 + 5) = *((_OWORD *)v7 + 5);
*((_OWORD *)v6 + 6) = *((_OWORD *)v7 + 6);
v6 += 16;
*((_OWORD *)v6 - 1) = *((_OWORD *)v7 + 7);
v7 += 128;
--v8;
}
while ( v8 );
*(_OWORD *)v6 = *(_OWORD *)v7;
*((_OWORD *)v6 + 1) = *((_OWORD *)v7 + 1);
*((_OWORD *)v6 + 2) = *((_OWORD *)v7 + 2);
v6[6] = *((_QWORD *)v7 + 6);
*((_DWORD *)v6 + 14) = *((_DWORD *)v7 + 14);
*((_WORD *)v6 + 30) = *((_WORD *)v7 + 30);
*((_BYTE *)v5 + 318) = 0;
v23 = 0;
v24 = 4;
v25 = 15;
strcpy((char *)&v23, "Help");
v9 = SetupTriggerPopup::addHelpButton(a1, &v23, &v20);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v11);
cocos2d::CCPoint::CCPoint(*(float *)&v9, v17 * 0.5);
v18[1] = &v20;
v20 = 0;
v21 = 6;
v22 = 15;
strcpy((char *)&v20, "Length");
cocos2d::CCPoint::CCPoint(0.0, -75.0);
cocos2d::CCPoint::operator+(&v26, v18);
v13 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
222,
(unsigned int)&v20,
(unsigned int)v18,
1059481190,
0,
2,
6,
0,
0,
1120403456,
0,
0,
1,
2,
v13);
v19 = &v23;
v23 = 0;
v24 = 2;
v25 = 15;
strcpy((char *)&v23, "+-");
cocos2d::CCPoint::CCPoint(0.0, 75.0);
cocos2d::CCPoint::operator+(&v26, v18);
LOBYTE(v14) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
223,
(unsigned int)&v23,
(unsigned int)v18,
1059481190,
0,
2,
6,
0,
0,
1120403456,
0,
0,
1,
2,
v14);
v19 = &v20;
v20 = 0;
v21 = 6;
v22 = 15;
strcpy((char *)&v20, "Offset");
cocos2d::CCPoint::CCPoint(0.0, -75.0);
cocos2d::CCPoint::operator+(&v26, v18);
LOBYTE(v15) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
220,
(unsigned int)&v20,
(unsigned int)v18,
1059481190,
0,
2,
6,
0,
-1027080192,
1120403456,
0,
0,
1,
2,
v15);
v19 = &v23;
v23 = 0;
v24 = 2;
v25 = 15;
strcpy((char *)&v23, "+-");
cocos2d::CCPoint::CCPoint(0.0, 75.0);
cocos2d::CCPoint::operator+(&v26, v18);
LOBYTE(v16) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
221,
(unsigned int)&v23,
(unsigned int)v18,
1059481190,
0,
2,
6,
0,
-1027080192,
1120403456,
0,
0,
1,
2,
v16);
SetupAreaMoveTriggerPopup::addAreaDefaultControls(a1, 0);
a1->updateDefaultTriggerValues(a1);
SetupTriggerPopup::createPageButtons(a1, (float)(a1->m_width * 0.5) + 15.0, v12);
SetupTriggerPopup::goToPage(a1, 0, 0);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}