//
// SetupAreaAnimTriggerPopup::init from 0x1004d55f0 to 0x1004d6ea4 (6324 bytes)
//
// 1 xrefs:
// > SetupAreaAnimTriggerPopup::create @ 0x1004d55a5
//
// This function is hookable on this platform (idp: pc, 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 12:31:14 +0000
//
__int64 __fastcall SetupAreaAnimTriggerPopup::init(__int64 a1, __int64 a2, __int64 a3, int a4)
{
__int64 result; // rax
__int64 v6; // rax
float v7; // xmm3_4
float v8; // xmm2_4
__int64 v9; // rax
__m128 v10; // rt1
char *v11; // rax
void *v12; // rax
__int64 v13; // r15
__int64 v14; // r12
__int64 v15; // r15
__int64 v16; // rax
const char *v17; // rsi
__int64 v18; // rax
char v19; // [rsp+40h] [rbp-3B0h] BYREF
char v20[23]; // [rsp+41h] [rbp-3AFh] BYREF
char v21; // [rsp+58h] [rbp-398h] BYREF
char v22[23]; // [rsp+59h] [rbp-397h] BYREF
char v23; // [rsp+70h] [rbp-380h] BYREF
char v24[23]; // [rsp+71h] [rbp-37Fh] BYREF
char v25; // [rsp+88h] [rbp-368h] BYREF
char v26[23]; // [rsp+89h] [rbp-367h] BYREF
char v27; // [rsp+A0h] [rbp-350h] BYREF
char v28[23]; // [rsp+A1h] [rbp-34Fh] BYREF
char v29[24]; // [rsp+B8h] [rbp-338h] BYREF
char v30; // [rsp+D0h] [rbp-320h] BYREF
char v31[23]; // [rsp+D1h] [rbp-31Fh] BYREF
char v32; // [rsp+E8h] [rbp-308h] BYREF
char v33[23]; // [rsp+E9h] [rbp-307h] BYREF
char v34; // [rsp+100h] [rbp-2F0h] BYREF
char v35[23]; // [rsp+101h] [rbp-2EFh] BYREF
char v36; // [rsp+118h] [rbp-2D8h] BYREF
char v37[23]; // [rsp+119h] [rbp-2D7h] BYREF
char v38[24]; // [rsp+130h] [rbp-2C0h] BYREF
char v39[24]; // [rsp+148h] [rbp-2A8h] BYREF
char v40; // [rsp+160h] [rbp-290h] BYREF
char v41[23]; // [rsp+161h] [rbp-28Fh] BYREF
char v42[24]; // [rsp+178h] [rbp-278h] BYREF
char v43; // [rsp+190h] [rbp-260h] BYREF
char v44[23]; // [rsp+191h] [rbp-25Fh] BYREF
char v45; // [rsp+1A8h] [rbp-248h] BYREF
char v46[23]; // [rsp+1A9h] [rbp-247h] BYREF
char v47; // [rsp+1C0h] [rbp-230h] BYREF
char v48[23]; // [rsp+1C1h] [rbp-22Fh] BYREF
char v49; // [rsp+1D8h] [rbp-218h] BYREF
char v50[23]; // [rsp+1D9h] [rbp-217h] BYREF
char v51; // [rsp+1F0h] [rbp-200h] BYREF
char v52[23]; // [rsp+1F1h] [rbp-1FFh] BYREF
char v53; // [rsp+208h] [rbp-1E8h] BYREF
char v54[23]; // [rsp+209h] [rbp-1E7h] BYREF
char v55; // [rsp+220h] [rbp-1D0h] BYREF
char v56[23]; // [rsp+221h] [rbp-1CFh] BYREF
char v57; // [rsp+238h] [rbp-1B8h] BYREF
char v58[23]; // [rsp+239h] [rbp-1B7h] BYREF
char v59; // [rsp+250h] [rbp-1A0h] BYREF
char v60[23]; // [rsp+251h] [rbp-19Fh] BYREF
char v61; // [rsp+268h] [rbp-188h] BYREF
char v62[23]; // [rsp+269h] [rbp-187h] BYREF
char v63; // [rsp+280h] [rbp-170h] BYREF
char v64[23]; // [rsp+281h] [rbp-16Fh] BYREF
char v65; // [rsp+298h] [rbp-158h] BYREF
char v66[23]; // [rsp+299h] [rbp-157h] BYREF
void *v67[3]; // [rsp+2B0h] [rbp-140h] BYREF
char v68; // [rsp+2C8h] [rbp-128h] BYREF
char v69[15]; // [rsp+2C9h] [rbp-127h] BYREF
void *v70; // [rsp+2D8h] [rbp-118h]
__int128 v71; // [rsp+2E0h] [rbp-110h] BYREF
void *v72; // [rsp+2F0h] [rbp-100h]
__int128 v73; // [rsp+2F8h] [rbp-F8h] BYREF
void *v74; // [rsp+308h] [rbp-E8h]
std::string v75; // [rsp+310h] [rbp-E0h] BYREF
__int128 v76; // [rsp+328h] [rbp-C8h] BYREF
void *v77; // [rsp+338h] [rbp-B8h]
char v78; // [rsp+340h] [rbp-B0h] BYREF
char v79[15]; // [rsp+341h] [rbp-AFh] BYREF
void *v80; // [rsp+350h] [rbp-A0h]
__int128 v81; // [rsp+358h] [rbp-98h] BYREF
void *v82; // [rsp+368h] [rbp-88h]
__int128 v83; // [rsp+370h] [rbp-80h] BYREF
void *v84; // [rsp+380h] [rbp-70h]
unsigned __int64 v85; // [rsp+388h] [rbp-68h] BYREF
__int64 v86; // [rsp+390h] [rbp-60h] BYREF
double v87[3]; // [rsp+398h] [rbp-58h] BYREF
unsigned __int8 v88; // [rsp+3B7h] [rbp-39h]
unsigned __int64 v89; // [rsp+3B8h] [rbp-38h] BYREF
unsigned __int64 v90[6]; // [rsp+3C0h] [rbp-30h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 1, 420.0, 280.0, 0.0);
if ( (_BYTE)result )
{
v88 = result;
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1360LL))(a1);
strcpy((char *)v67, "\"Area Anim Trigger");
SetupTriggerPopup::addTitle(a1, (__int64)v67);
if ( ((__int64)v67[0] & 1) != 0 )
operator delete(v67[2]);
v68 = 4;
strcpy(v69, "OK");
SetupTriggerPopup::addCloseButton(a1, (__int64)&v68);
if ( (v68 & 1) != 0 )
operator delete(v70);
LOBYTE(v71) = 8;
strcpy((char *)&v71 + 1, "Help");
v74 = operator new(0x78u);
*(_QWORD *)&v73 = 121;
*((_QWORD *)&v73 + 1) = 118;
strcpy(
(char *)v74,
"Edits the properties of an Area trigger.\n"
"Use Group ID or Effect ID to link to the correct one.");
SetupTriggerPopup::addHelpButton(a1, &v71, &v73, 1.0);
if ( (v73 & 1) != 0 )
operator delete(v74);
if ( (v71 & 1) != 0 )
operator delete(v72);
sub_10021B1F0((float *)a1, (__int64)&v71);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v86, v6);
sub_100278250((float *)&v89, *(float *)&v86 * 0.5, (float)(*((float *)&v86 + 1) * 0.5) + 96.0);
v53 = 12;
strcpy(v54, "Length");
sub_100278250((float *)v90, -90.0, 0.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
222,
(unsigned int)&v53,
(unsigned int)v87,
0,
2,
6,
0,
0,
0,
1);
v19 = 4;
strcpy(v20, "+-");
sub_100278250((float *)v90, 90.0, 0.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
223,
(unsigned int)&v19,
(unsigned int)v87,
0,
2,
6,
0,
0,
0,
1);
v55 = 12;
strcpy(v56, "Offset");
sub_100278250((float *)v90, -90.0, -22.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
220,
(unsigned int)&v55,
(unsigned int)v87,
0,
2,
6,
0,
0,
0,
1);
v21 = 4;
strcpy(v22, "+-");
sub_100278250((float *)v90, 90.0, -22.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
221,
(unsigned int)&v21,
(unsigned int)v87,
0,
2,
6,
0,
0,
0,
1);
v57 = 14;
strcpy(v58, "OffsetY");
sub_100278250((float *)v90, -90.0, -44.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
252,
(unsigned int)&v57,
(unsigned int)v87,
0,
2,
6,
0,
0,
0,
1);
v23 = 4;
strcpy(v24, "+-");
sub_100278250((float *)v90, 90.0, -44.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
253,
(unsigned int)&v23,
(unsigned int)v87,
0,
2,
6,
0,
0,
0,
1);
v25 = 16;
strcpy(v26, "ModFront");
sub_100278250((float *)v90, -90.0, -66.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
263,
(unsigned int)&v25,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v27 = 4;
strcpy(v28, "BK");
sub_100278250((float *)v90, 90.0, -66.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
264,
(unsigned int)&v27,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v75.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16;
strcpy(v75.__r_.__value_.__s.__data_, "Duration");
sub_100278250((float *)v90, -90.0, -88.0);
sub_100278350(v87, &v89, v90);
SetupTriggerPopup::createValueControlAdvanced(
a1,
10,
&v75,
(__int64)v87,
0,
1u,
0.60000002,
0.0,
2.0,
6u,
0,
0,
0,
1u,
2u,
0);
if ( (*(_BYTE *)&v75.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v75.__r_.__value_.__l.__data_);
strcpy(v29, "\nDeadZ");
sub_100278250((float *)v90, 90.0, -88.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
282,
(unsigned int)v29,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v78 = 12;
strcpy(v79, "Easing");
sub_100278250((float *)v90, -112.0, -154.0);
sub_100278350(v87, &v89, v90);
SetupTriggerPopup::createCustomEasingControls(a1, (__int64)&v78, (__int64)v87, 0xF2u, 0xF3u, 0, 0.69999999, 0);
if ( (v78 & 1) != 0 )
operator delete(v80);
LOBYTE(v87[0]) = 14;
strcpy((char *)v87 + 1, "GroupID");
if ( a4 == 3011 )
{
sub_100278250((float *)&v85, 90.0, -176.0);
sub_100278350((double *)v90, &v89, &v85);
IDNameInput::create(a1, a1 + 544, 1, 51, (unsigned int)v87, (unsigned int)v90, 6, 0, 1, 1);
}
else
{
sub_100278250((float *)&v85, 110.0, -176.0);
sub_100278350((double *)v90, &v89, &v85);
IDNameInput::create(a1, a1 + 544, 1, 51, (unsigned int)v87, (unsigned int)v90, 6, 0, 1, 0);
}
if ( (LOBYTE(v87[0]) & 1) != 0 )
operator delete(*(void **)&v87[2]);
LOBYTE(v81) = 14;
strcpy((char *)&v81 + 1, "Use\nEID");
sub_100278250(
(float *)v87,
(float)(*(float *)&v86 * 0.5) + 60.0,
(float)((float)(*((float *)&v86 + 1) * 0.5) - (float)(*(float *)(a1 + 736) * 0.5)) + 20.0);
SetupTriggerPopup::createToggleValueControl(a1, 355, &v81, (__int64)v87, 0, 0, 1.0, 0);
if ( (v81 & 1) != 0 )
operator delete(v82);
switch ( a4 )
{
case 3011:
v30 = 16;
strcpy(v31, "MoveDist");
sub_100278250((float *)v90, -90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
218,
(unsigned int)&v30,
(unsigned int)v87,
0,
2,
6,
0,
0,
1,
1);
v32 = 4;
strcpy(v33, "+-");
sub_100278250((float *)v90, 90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
219,
(unsigned int)&v32,
(unsigned int)v87,
0,
2,
6,
0,
0,
1,
1);
v34 = 18;
strcpy(v35, "MoveAngle");
sub_100278250((float *)v90, -90.0, -132.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
231,
(unsigned int)&v34,
(unsigned int)v87,
0,
2,
6,
0,
0,
1,
1);
v36 = 4;
strcpy(v37, "+-");
sub_100278250((float *)v90, 90.0, -132.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
232,
(unsigned int)&v36,
(unsigned int)v87,
0,
2,
6,
0,
0,
1,
1);
v7 = *(float *)(a1 + 732) * 0.5;
v8 = *(float *)(a1 + 736) * 0.5;
LOBYTE(v83) = 14;
strcpy((char *)&v83 + 1, "XY\nMode");
sub_100278250(
(float *)v87,
(float)((float)(*(float *)&v86 * 0.5) + v7) + -58.0,
(float)((float)(0.5 * *((float *)&v86 + 1)) + v8) + -20.0);
SetupTriggerPopup::createToggleValueControl(a1, 241, &v83, (__int64)v87, 0, 0, 1.0, 0);
if ( (v83 & 1) != 0 )
operator delete(v84);
strcpy(v38, "\nRFade");
sub_100278250((float *)v90, 90.0, -154.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
288,
(unsigned int)v38,
(unsigned int)v87,
0,
1,
6,
0,
0,
1,
1);
strcpy(v39, "\nMoveX");
sub_100278250((float *)v90, -90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
237,
(unsigned int)v39,
(unsigned int)v87,
0,
2,
6,
0,
0,
2,
1);
v40 = 4;
strcpy(v41, "+-");
sub_100278250((float *)v90, 90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
238,
(unsigned int)&v40,
(unsigned int)v87,
0,
2,
6,
0,
0,
2,
1);
strcpy(v42, "\nMoveY");
sub_100278250((float *)v90, -90.0, -132.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
239,
(unsigned int)v42,
(unsigned int)v87,
0,
2,
6,
0,
0,
2,
1);
v43 = 4;
strcpy(v44, "+-");
sub_100278250((float *)v90, 90.0, -132.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
240,
(unsigned int)&v43,
(unsigned int)v87,
0,
2,
6,
0,
0,
2,
1);
(*(void (__fastcall **)(__int64, float, double, float))(*(_QWORD *)a1 + 1432LL))(a1, 0.60000002, 0.0, 200.0);
v9 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 832), 241);
if ( v9 )
{
v10.i32[0] = *(_DWORD *)(v9 + 56);
(*(void (__fastcall **)(__int64, __int64, double))(*(_QWORD *)a1 + 1456LL))(
a1,
241,
COERCE_DOUBLE(_mm_cmpneq_ss((__m128)0LL, v10).u64[0] & 0x3F800000));
}
else
{
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 1, 0);
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 2, 0);
}
goto LABEL_38;
case 3012:
v45 = 16;
strcpy(v46, "Rotation");
sub_100278250((float *)v90, -90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
270,
(unsigned int)&v45,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v47 = 4;
strcpy(v48, "+-");
sub_100278250((float *)v90, 90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
271,
(unsigned int)&v47,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
goto LABEL_37;
case 3013:
v59 = 12;
strcpy(v60, "ScaleX");
sub_100278250((float *)v90, -90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
233,
(unsigned int)&v59,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v49 = 4;
strcpy(v50, "+-");
sub_100278250((float *)v90, 90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
234,
(unsigned int)&v49,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v61 = 12;
strcpy(v62, "ScaleY");
sub_100278250((float *)v90, -90.0, -132.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
235,
(unsigned int)&v61,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
v51 = 4;
strcpy(v52, "+-");
sub_100278250((float *)v90, 90.0, -132.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
236,
(unsigned int)&v51,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
goto LABEL_37;
case 3014:
v63 = 14;
strcpy(v64, "Opacity");
sub_100278250((float *)v90, -90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
275,
(unsigned int)&v63,
(unsigned int)v87,
0,
1,
6,
0,
0,
0,
1);
goto LABEL_37;
case 3015:
v65 = 12;
strcpy(v66, "Tint %");
sub_100278250((float *)v90, -90.0, -110.0);
sub_100278350(v87, &v89, v90);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
265,
(unsigned int)&v65,
(unsigned int)v87,
0,
1,
6,
0,
0,
1,
1);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_hsvBtn_001.png", COERCE_DOUBLE(1058642330));
v12 = CCMenuItemSpriteExtra::create((__int64)v11, 0, a1, (__int64)sub_1004D3F30, 0);
*(_QWORD *)(a1 + 1040) = v12;
(*(void (__fastcall **)(_QWORD, void *, float, double, float))(**(_QWORD **)(a1 + 552) + 456LL))(
*(_QWORD *)(a1 + 552),
v12,
0.60000002,
0.0,
1.0);
v13 = *(_QWORD *)(a1 + 1040);
v14 = *(_QWORD *)(a1 + 552);
sub_100278250((float *)&v85, 75.0, -120.0);
sub_100278350((double *)v90, &v89, &v85);
cocos2d::CCNode::convertToNodeSpace(v87, v14, (unsigned int *)v90);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v13 + 184LL))(v13, v87);
v15 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1040) + 1072LL))(*(_QWORD *)(a1 + 1040));
v16 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v17 = "GJ_hsv2Btn_001.png";
if ( *(float *)(a1 + 1048) == *(float *)&xmmword_100BE43B8
&& *(float *)(a1 + 1052) == *((float *)&xmmword_100BE43B8 + 1)
&& *(float *)(a1 + 1056) == *((float *)&xmmword_100BE43B8 + 2)
&& *(_BYTE *)(a1 + 1060) == BYTE12(xmmword_100BE43B8) )
{
v17 = "GJ_hsv2Btn_001.png";
if ( *(_BYTE *)(a1 + 1061) == BYTE13(xmmword_100BE43B8) )
v17 = "GJ_hsvBtn_001.png";
}
v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v16, v17);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 1160LL))(v15, v18);
LOBYTE(v76) = 16;
strcpy((char *)&v76 + 1, "Edit\nHSV");
sub_100278250((float *)v90, 125.0, -120.0);
sub_100278350(v87, &v89, v90);
SetupTriggerPopup::createToggleValueControl(a1, 278, &v76, (__int64)v87, 0, 0, 1.0, 0);
if ( (v76 & 1) != 0 )
operator delete(v77);
goto LABEL_37;
default:
LABEL_37:
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1432LL))(a1);
LABEL_38:
*(_BYTE *)(a1 + 744) = 0;
result = v88;
break;
}
}
return result;
}