//
// SetupAreaAnimTriggerPopup::init from 0x140410e60 to 0x1404125c1 (5985 bytes)
//
// 2 xrefs:
// > EditorUI::editObject @ 0x14011ddbc
// > ??> @ 0x1406d8cc0
//
// 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 SetupAreaAnimTriggerPopup::init(
SetupAreaAnimTriggerPopup *a1,
EnterEffectObject *a2,
cocos2d::CCArray *a3,
int a4)
{
bool result; // al
double v7; // xmm0_8
__int64 v8; // rcx
cocos2d::CCDirector *v9; // rax
double v10; // xmm0_8
double v11; // xmm0_8
int v12; // r9d
int v13; // eax
double ToggleValueControl; // xmm0_8
struct cocos2d::CCSprite *v15; // rax
CCMenuItemSpriteExtra *v16; // rax
float v17; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v18; // rbx
struct cocos2d::CCPoint v19; // rax
int v20; // eax
int v21; // [rsp+30h] [rbp-D8h]
int v22; // [rsp+30h] [rbp-D8h]
int v23; // [rsp+30h] [rbp-D8h]
int v24; // [rsp+30h] [rbp-D8h]
int v25; // [rsp+30h] [rbp-D8h]
int v26; // [rsp+30h] [rbp-D8h]
int v27; // [rsp+30h] [rbp-D8h]
int v28; // [rsp+30h] [rbp-D8h]
int v29; // [rsp+30h] [rbp-D8h]
int v30; // [rsp+30h] [rbp-D8h]
int v31; // [rsp+30h] [rbp-D8h]
int v32; // [rsp+30h] [rbp-D8h]
int v33; // [rsp+30h] [rbp-D8h]
int v34; // [rsp+30h] [rbp-D8h]
int v35; // [rsp+30h] [rbp-D8h]
int v36; // [rsp+30h] [rbp-D8h]
int v37; // [rsp+30h] [rbp-D8h]
int v38; // [rsp+30h] [rbp-D8h]
int v39; // [rsp+30h] [rbp-D8h]
int v40; // [rsp+30h] [rbp-D8h]
int v41; // [rsp+30h] [rbp-D8h]
int v42; // [rsp+30h] [rbp-D8h]
int v43; // [rsp+38h] [rbp-D0h]
__int128 *v44; // [rsp+88h] [rbp-80h] BYREF
__int128 v45; // [rsp+90h] [rbp-78h] BYREF
__int64 v46; // [rsp+A0h] [rbp-68h]
__int64 v47; // [rsp+A8h] [rbp-60h]
__int128 *v48; // [rsp+B0h] [rbp-58h] BYREF
__int128 *v49; // [rsp+B8h] [rbp-50h]
_BYTE v50[8]; // [rsp+C0h] [rbp-48h] BYREF
__int128 v51; // [rsp+C8h] [rbp-40h] BYREF
__int64 v52; // [rsp+D8h] [rbp-30h]
__int64 v53; // [rsp+E0h] [rbp-28h]
float v54; // [rsp+E8h] [rbp-20h]
result = SetupTriggerPopup::init(a1, a2, a3, 420.0, 280.0, 1);
if ( result )
{
a1->determineStartValues(a1);
v45 = 0;
*(_QWORD *)&v45 = sub_14003AA10(0x20u);
v46 = 17;
v47 = 31;
strcpy((char *)v45, "Area Anim Trigger");
SetupTriggerPopup::addTitle(a1, &v45);
v45 = 0;
v46 = 2;
v47 = 15;
strcpy((char *)&v45, "OK");
SetupTriggerPopup::addCloseButton(a1, &v45);
v44 = &v45;
v45 = 0;
v46 = 0;
v47 = 15;
*(_QWORD *)&v45 = sub_14003AA10(0x80u);
v46 = 118;
v47 = 127;
strcpy(
(char *)v45,
"Edits the properties of an Area trigger.\n"
"Use Group ID or Effect ID to link to the correct one.");
v51 = 0;
v52 = 4;
v53 = 15;
strcpy((char *)&v51, "Help");
v7 = SetupTriggerPopup::addHelpButton(a1, &v51, &v45);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
cocos2d::CCDirector::getWinSize(v9);
cocos2d::CCPoint::CCPoint(*(float *)&v7, v54 * 0.5);
v48 = &v45;
v45 = 0;
v46 = 6;
v47 = 15;
strcpy((char *)&v45, "Length");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
222,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v21,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
223,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v22,
2);
v49 = &v45;
v45 = 0;
v46 = 6;
v47 = 15;
strcpy((char *)&v45, "Offset");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
220,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v23,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
v10 = cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
221,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v24,
2);
v49 = &v45;
v46 = 7;
v47 = 15;
v45 = 0x5974657366664FuLL;
cocos2d::CCPoint::CCPoint(*(float *)&v10, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
252,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v25,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
253,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v26,
2);
v49 = &v51;
v52 = 8;
v53 = 15;
v51 = 0x746E6F7246646F4DuLL;
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
263,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v27,
1);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "BK");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
264,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v28,
1);
v49 = &v51;
v52 = 8;
v53 = 15;
v51 = 0x6E6F697461727544uLL;
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
10,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
0,
1,
6,
0,
0,
0x40000000,
0,
0,
1,
2);
v49 = &v45;
v45 = 0;
v46 = 5;
v47 = 15;
strcpy((char *)&v45, "DeadZ");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
282,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v29,
1);
v49 = &v45;
v45 = 0;
v46 = 6;
v47 = 15;
strcpy((char *)&v45, "Easing");
cocos2d::CCPoint::CCPoint(0.0, -112.0);
v11 = cocos2d::CCPoint::operator+(v50, &v44);
SetupTriggerPopup::createCustomEasingControls(
(_DWORD)a1,
(unsigned int)&v45,
(unsigned int)&v44,
v12,
242,
243,
v43,
0);
v46 = 7;
v47 = 15;
v49 = &v45;
v45 = 0x444970756F7247uLL;
if ( a4 == 3011 )
{
cocos2d::CCPoint::CCPoint(*(float *)&v11, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
1,
3,
6,
1,
0,
1120403456,
1,
0,
1,
2,
0,
v44,
v45,
v46,
v47);
}
else
{
cocos2d::CCPoint::CCPoint(*(float *)&v11, 110.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
1,
3,
6,
1,
0,
1120403456,
1,
0,
0,
2,
0,
v44,
v45,
v46,
v47);
}
v49 = &v45;
v46 = 7;
v47 = 15;
v45 = 0x4449450A657355uLL;
cocos2d::CCPoint::CCPoint(a1->m_height * 0.5, (float)(v54 * 0.5) + 60.0);
ToggleValueControl = SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
355,
(unsigned int)&v45,
v13,
0,
0,
0,
1065353216);
if ( a4 == 3011 )
{
v49 = &v51;
v52 = 8;
v53 = 15;
v51 = 0x7473694465766F4DuLL;
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
218,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v30,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
219,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v35,
2);
v49 = &v45;
*((_QWORD *)&v45 + 1) = 101;
v46 = 9;
v47 = 15;
*(_QWORD *)&v45 = 0x6C676E4165766F4DLL;
cocos2d::CCPoint::CCPoint(7.2734706e22, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
231,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v36,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
232,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v37,
2);
v49 = &v45;
v46 = 7;
v47 = 15;
v45 = 0x65646F4D0A5958uLL;
cocos2d::CCPoint::CCPoint(v54 * 0.5, (float)((float)(a1->m_width * 0.5) + (float)(v54 * 0.5)) - 58.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 241, (unsigned int)&v45, v20, 0, 0, 0, 1065353216);
v49 = &v45;
v45 = 0;
v46 = 5;
v47 = 15;
strcpy((char *)&v45, "RFade");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
288,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v38,
1);
v49 = &v45;
v45 = 0;
v46 = 5;
v47 = 15;
strcpy((char *)&v45, "MoveX");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
237,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v39,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
238,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v40,
2);
v49 = &v45;
v45 = 0;
v46 = 5;
v47 = 15;
strcpy((char *)&v45, "MoveY");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
239,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v41,
2);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
240,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v42,
2);
a1->updateDefaultTriggerValues(a1);
if ( cocos2d::CCDictionary::objectForKey(a1->m_triggerValues, 241) )
{
((void (__fastcall *)(SetupAreaAnimTriggerPopup *, __int64))a1->valueDidChange)(a1, 241);
}
else
{
((void (__fastcall *)(SetupAreaAnimTriggerPopup *, __int64))a1->toggleGroup)(a1, 1);
((void (__fastcall *)(SetupAreaAnimTriggerPopup *, __int64))a1->toggleGroup)(a1, 2);
}
}
else if ( a4 == 3012 )
{
v49 = &v51;
v52 = 8;
v53 = 15;
v51 = 0x6E6F697461746F52uLL;
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
270,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v30,
1);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
271,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v34,
1);
a1->updateDefaultTriggerValues(a1);
}
else if ( a4 == 3013 )
{
v49 = &v45;
v45 = 0;
v46 = 6;
v47 = 15;
strcpy((char *)&v45, "ScaleX");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
233,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v30,
1);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
234,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v31,
1);
v49 = &v45;
v45 = 0;
v46 = 6;
v47 = 15;
strcpy((char *)&v45, "ScaleY");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
235,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v32,
1);
v49 = &v51;
v51 = 0;
v52 = 2;
v53 = 15;
strcpy((char *)&v51, "+-");
cocos2d::CCPoint::CCPoint(0.0, 90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
236,
(unsigned int)&v51,
(unsigned int)&v44,
1058642330,
v33,
1);
a1->updateDefaultTriggerValues(a1);
}
else if ( a4 == 3014 )
{
v49 = &v45;
v46 = 7;
v47 = 15;
v45 = 0x7974696361704FuLL;
cocos2d::CCPoint::CCPoint(*(float *)&ToggleValueControl, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
275,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v30,
1);
a1->updateDefaultTriggerValues(a1);
}
else
{
if ( a4 == 3015 )
{
v49 = &v45;
v45 = 0;
v46 = 6;
v47 = 15;
strcpy((char *)&v45, "Tint %");
cocos2d::CCPoint::CCPoint(0.0, -90.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
(_DWORD)a1,
265,
(unsigned int)&v45,
(unsigned int)&v44,
1058642330,
v30,
1);
v15 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hsvBtn_001.png");
v16 = CCMenuItemSpriteExtra::create(
v15,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)SetupAreaTintTriggerPopup::onHSV);
a1->m_hsvButton = v16;
v17 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v16);
cocos2d::CCPoint::CCPoint(v17, 75.0);
cocos2d::CCPoint::operator+(v50, &v44);
v18 = a1->m_hsvButton->SetupAreaTintTriggerPopup::__vftable;
v19 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v48);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v18->setPosition_0)(
a1->m_hsvButton,
v19);
SetupAreaTintTriggerPopup::updateHSVButton(a1);
v49 = &v51;
v52 = 8;
v53 = 15;
v51 = 0x5653480A74696445uLL;
cocos2d::CCPoint::CCPoint(0.0, 125.0);
cocos2d::CCPoint::operator+(v50, &v44);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
278,
(unsigned int)&v51,
(unsigned int)&v44,
0,
0,
0,
1065353216);
}
a1->updateDefaultTriggerValues(a1);
}
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}