//
// SetupKeyframeAnimPopup::init from 0x1001fec80 to 0x1001ff5e0 (2400 bytes)
//
// 1 xrefs:
// > SetupKeyframeAnimPopup::create @ 0x1001fec3b
//
// 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
//
bool __fastcall SetupKeyframeAnimPopup::init(SetupKeyframeAnimPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
bool v4; // r15
char v5; // [rsp+38h] [rbp-178h] BYREF
char v6[15]; // [rsp+39h] [rbp-177h] BYREF
void *v7; // [rsp+48h] [rbp-168h]
char v8; // [rsp+50h] [rbp-160h] BYREF
char v9[15]; // [rsp+51h] [rbp-15Fh] BYREF
void *v10; // [rsp+60h] [rbp-150h]
_QWORD v11[2]; // [rsp+68h] [rbp-148h] BYREF
void *v12; // [rsp+78h] [rbp-138h]
char v13; // [rsp+80h] [rbp-130h] BYREF
_BYTE v14[23]; // [rsp+81h] [rbp-12Fh] BYREF
char v15; // [rsp+98h] [rbp-118h] BYREF
_BYTE v16[23]; // [rsp+99h] [rbp-117h] BYREF
char v17; // [rsp+B0h] [rbp-100h] BYREF
_BYTE v18[23]; // [rsp+B1h] [rbp-FFh] BYREF
void *v19[3]; // [rsp+C8h] [rbp-E8h] BYREF
void *v20[3]; // [rsp+E0h] [rbp-D0h] BYREF
char v21; // [rsp+F8h] [rbp-B8h] BYREF
_BYTE v22[23]; // [rsp+F9h] [rbp-B7h] BYREF
char v23; // [rsp+110h] [rbp-A0h] BYREF
_BYTE v24[23]; // [rsp+111h] [rbp-9Fh] BYREF
char v25; // [rsp+128h] [rbp-88h] BYREF
_BYTE v26[23]; // [rsp+129h] [rbp-87h] BYREF
char v27; // [rsp+140h] [rbp-70h] BYREF
_BYTE v28[23]; // [rsp+141h] [rbp-6Fh] BYREF
char v29; // [rsp+158h] [rbp-58h] BYREF
_BYTE v30[23]; // [rsp+159h] [rbp-57h] BYREF
float v31; // [rsp+170h] [rbp-40h] BYREF
float v32; // [rsp+174h] [rbp-3Ch]
_BYTE v33[8]; // [rsp+178h] [rbp-38h] BYREF
_BYTE v34[8]; // [rsp+180h] [rbp-30h] BYREF
_BYTE v35[40]; // [rsp+188h] [rbp-28h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 340.0, 280.0, 1);
if ( result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
strcpy((char *)v19, "&Setup Keyframe Anim");
SetupTriggerPopup::addTitle(a1, v19);
if ( ((__int64)v19[0] & 1) != 0 )
operator delete(v19[2]);
v5 = 4;
strcpy(v6, "OK");
SetupTriggerPopup::addCloseButton(a1, &v5);
if ( (v5 & 1) != 0 )
operator delete(v7);
v8 = 8;
strcpy(v9, "Help");
v12 = operator new(0x190u);
v11[0] = 401;
v11[1] = 393;
strcpy(
(char *)v12,
"Sets up a keyframe animation using Animation Group ID.\n"
"Use Target ID to specify a different target than the one set in the Keyframe trigger.\n"
"The animation itself is made in the Keyframe trigger.\n"
"By default, objects choose their own center for scaling and rotation, but you can set one using Parent ID."
"\n"
"On page 2, you can put modifiers for the keyframe sequence.");
SetupTriggerPopup::addHelpButton(a1, &v8, v11, 1.0);
if ( (v11[0] & 1) != 0 )
operator delete(v12);
if ( (v8 & 1) != 0 )
operator delete(v10);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v31);
sub_10028CBE0(v33, v31 * 0.5, (float)(v32 * 0.5) + 60.0);
strcpy((char *)v20, "$Animation Group ID");
sub_10028CBE0(v34, 0.0, 0.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
76,
(unsigned int)v20,
(unsigned int)v35,
1,
3,
6,
1,
0,
0,
0,
2,
0);
if ( ((__int64)v20[0] & 1) != 0 )
operator delete(v20[2]);
v13 = 18;
strcpy(v14, "Target ID");
sub_10028CBE0(v34, -85.0, -70.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v13,
(unsigned int)v35,
1,
3,
6,
1,
0,
0,
0,
2,
0);
if ( (v13 & 1) != 0 )
operator delete(*(void **)&v14[15]);
v15 = 18;
strcpy(v16, "Parent ID");
sub_10028CBE0(v34, 85.0, -70.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
71,
(unsigned int)&v15,
(unsigned int)v35,
1,
3,
6,
1,
0,
0,
0,
2,
0);
if ( (v15 & 1) != 0 )
operator delete(*(void **)&v16[15]);
sub_10028CBE0(v35, v31 * 0.5, (float)(0.5 * v32) + 95.0);
sub_10028CC90();
v17 = 18;
strcpy(v18, "Time Mod:");
sub_10028CBE0(v34, 0.0, 0.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
520,
(unsigned int)&v17,
(unsigned int)v35,
0,
1,
6,
0,
1,
0,
1,
2,
0);
if ( (v17 & 1) != 0 )
operator delete(*(void **)&v18[15]);
v21 = 30;
strcpy(v22, "Position X Mod:");
sub_10028CBE0(v34, 0.0, -30.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
521,
(unsigned int)&v21,
(unsigned int)v35,
0,
1,
6,
0,
1,
0,
1,
2,
0);
if ( (v21 & 1) != 0 )
operator delete(*(void **)&v22[15]);
v23 = 30;
strcpy(v24, "Position Y Mod:");
sub_10028CBE0(v34, 0.0, -60.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
545,
(unsigned int)&v23,
(unsigned int)v35,
0,
1,
6,
0,
1,
0,
1,
2,
0);
if ( (v23 & 1) != 0 )
operator delete(*(void **)&v24[15]);
v25 = 26;
strcpy(v26, "Rotation mod:");
sub_10028CBE0(v34, 0.0, -90.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
522,
(unsigned int)&v25,
(unsigned int)v35,
0,
1,
6,
0,
1,
0,
1,
2,
0);
if ( (v25 & 1) != 0 )
operator delete(*(void **)&v26[15]);
v27 = 24;
strcpy(v28, "Scale X Mod:");
sub_10028CBE0(v34, 0.0, -120.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
523,
(unsigned int)&v27,
(unsigned int)v35,
0,
1,
6,
0,
1,
0,
1,
2,
0);
if ( (v27 & 1) != 0 )
operator delete(*(void **)&v28[15]);
v29 = 24;
strcpy(v30, "Scale Y Mod:");
sub_10028CBE0(v34, 0.0, -150.0);
sub_10028CCE0(v35, v33);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
546,
(unsigned int)&v29,
(unsigned int)v35,
0,
1,
6,
0,
1,
0,
1,
2,
0);
if ( (v29 & 1) != 0 )
operator delete(*(void **)&v30[15]);
SetupTriggerPopup::createPageButtons(a1, (float)(a1->m_width * 0.5) + 15.0, 1);
SetupTriggerPopup::goToPage(a1, 0, 0);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}