//
// SetupKeyframeAnimPopup::init from 0x140424800 to 0x140425217 (2583 bytes)
//
// 3 xrefs:
// > SetupKeyframeAnimPopup::create @ 0x1404247be
// > ??> @ 0x1406d9704
// > ??> @ 0x1406d9710
//
// 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 SetupKeyframeAnimPopup::init(SetupKeyframeAnimPopup *a1, EffectGameObject *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
double ValueControlAdvanced; // xmm0_8
__int64 v13; // rax
int v14; // r8d
char v15; // [rsp+80h] [rbp-88h]
__int64 v16; // [rsp+80h] [rbp-88h]
__int64 v17; // [rsp+80h] [rbp-88h]
__int64 v18; // [rsp+80h] [rbp-88h]
__int64 v19; // [rsp+80h] [rbp-88h]
__int64 v20; // [rsp+80h] [rbp-88h]
__int64 v21; // [rsp+80h] [rbp-88h]
__int64 v22; // [rsp+80h] [rbp-88h]
__int64 v23; // [rsp+80h] [rbp-88h]
float v24; // [rsp+88h] [rbp-80h]
_QWORD v25[2]; // [rsp+90h] [rbp-78h] BYREF
__int128 *v26; // [rsp+A0h] [rbp-68h]
__int128 v27; // [rsp+A8h] [rbp-60h] BYREF
__int64 v28; // [rsp+B8h] [rbp-50h]
__int64 v29; // [rsp+C0h] [rbp-48h]
__int128 v30; // [rsp+C8h] [rbp-40h] BYREF
__int64 v31; // [rsp+D8h] [rbp-30h]
__int64 v32; // [rsp+E0h] [rbp-28h]
char v33; // [rsp+170h] [rbp+68h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 340.0, 280.0, 1);
if ( result )
{
a1->m_disableTextDelegate = 1;
a1->determineStartValues(a1);
v27 = 0;
*(_QWORD *)&v27 = sub_14003AA10(0x20u);
v28 = 19;
v29 = 31;
strcpy((char *)v27, "Setup Keyframe Anim");
SetupTriggerPopup::addTitle(a1, &v27);
v27 = 0;
v28 = 2;
v29 = 15;
strcpy((char *)&v27, "OK");
SetupTriggerPopup::addCloseButton(a1, &v27);
v25[0] = &v27;
v27 = 0;
v28 = 0;
v29 = 15;
v5 = sub_14003AA10(0x190u);
*(_QWORD *)&v27 = v5;
v28 = 393;
v29 = 399;
v6 = v5;
v7 = "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"
"c>.\n"
"On page 2, you can put modifiers for the keyframe sequence.";
v8 = 3;
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 );
*v6 = *(_QWORD *)v7;
*((_BYTE *)v6 + 8) = v7[8];
*((_BYTE *)v5 + 393) = 0;
v30 = 0;
v31 = 4;
v32 = 15;
strcpy((char *)&v30, "Help");
v9 = SetupTriggerPopup::addHelpButton(a1, &v30, &v27);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v11);
cocos2d::CCPoint::CCPoint(*(float *)&v9, v24 * 0.5);
v25[1] = &v27;
v27 = 0;
v28 = 0;
v29 = 15;
*(_QWORD *)&v27 = sub_14003AA10(0x20u);
v28 = 18;
v29 = 31;
strcpy((char *)v27, "Animation Group ID");
cocos2d::CCPoint::CCPoint(4.515206e27, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
v15 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
76,
(unsigned int)&v27,
(unsigned int)v25,
1061997773,
1,
3,
6,
1,
0,
1176255488,
0,
0,
0,
2,
v15);
v26 = &v27;
v28 = 9;
v29 = 15;
*(_QWORD *)&v27 = *(_QWORD *)"Target ID";
*((_QWORD *)&v27 + 1) = (unsigned __int8)aTargetId[8];
BYTE9(v27) = 0;
cocos2d::CCPoint::CCPoint(1.1446081e24, -85.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v16) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v27,
(unsigned int)v25,
1061997773,
1,
3,
6,
1,
0,
1176255488,
0,
0,
0,
2,
v16);
v26 = &v27;
*((_QWORD *)&v27 + 1) = 68;
v28 = 9;
v29 = 15;
*(_QWORD *)&v27 = 0x4920746E65726150LL;
cocos2d::CCPoint::CCPoint(7.1537987e22, 85.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v17) = 0;
ValueControlAdvanced = SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
71,
(unsigned int)&v27,
(unsigned int)v25,
1061997773,
1,
3,
6,
1,
0,
1176255488,
0,
0,
0,
2,
v17);
cocos2d::CCPoint::CCPoint(*(float *)&ValueControlAdvanced, v24 * 0.5);
cocos2d::CCPoint::operator=(&v33, v13);
v26 = &v27;
*((_QWORD *)&v27 + 1) = 58;
v28 = 9;
v29 = 15;
*(_QWORD *)&v27 = 0x646F4D20656D6954LL;
cocos2d::CCPoint::CCPoint(7.0071489e22, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v18) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
520,
(unsigned int)&v27,
(unsigned int)v25,
1060320051,
0,
1,
6,
0,
0,
1065353216,
1,
0,
1,
2,
v18);
v26 = &v27;
v28 = 15;
v29 = 15;
strcpy((char *)&v27, "Position X Mod:");
cocos2d::CCPoint::CCPoint(1.8393415e25, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v19) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
521,
(unsigned int)&v27,
(unsigned int)v25,
1060320051,
0,
1,
6,
0,
-1073741824,
0x40000000,
1,
0,
1,
2,
v19);
v26 = &v27;
v28 = 15;
v29 = 15;
strcpy((char *)&v27, "Position Y Mod:");
cocos2d::CCPoint::CCPoint(1.8393415e25, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v20) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
545,
(unsigned int)&v27,
(unsigned int)v25,
1060320051,
0,
1,
6,
0,
-1073741824,
0x40000000,
1,
0,
1,
2,
v20);
v26 = &v27;
v28 = 13;
v29 = 15;
strcpy((char *)&v27, "Rotation mod:");
HIWORD(v27) = 0;
cocos2d::CCPoint::CCPoint(2.8181419e20, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v21) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
522,
(unsigned int)&v27,
(unsigned int)v25,
1060320051,
0,
1,
6,
0,
-1073741824,
0x40000000,
1,
0,
1,
2,
v21);
v26 = &v27;
v28 = 12;
v29 = 15;
strcpy((char *)&v27, "Scale X Mod:");
BYTE13(v27) = 0;
HIWORD(v27) = 0;
cocos2d::CCPoint::CCPoint(1.0899094e27, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v22) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
523,
(unsigned int)&v27,
(unsigned int)v25,
1060320051,
0,
1,
6,
0,
-1073741824,
0x40000000,
1,
0,
1,
2,
v22);
v26 = &v27;
v28 = 12;
v29 = 15;
strcpy((char *)&v27, "Scale Y Mod:");
BYTE13(v27) = 0;
HIWORD(v27) = 0;
cocos2d::CCPoint::CCPoint(1.0899094e27, 0.0);
cocos2d::CCPoint::operator+(&v33, v25);
LOBYTE(v23) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
546,
(unsigned int)&v27,
(unsigned int)v25,
1060320051,
0,
1,
6,
0,
-1073741824,
0x40000000,
1,
0,
1,
2,
v23);
SetupTriggerPopup::createPageButtons(a1, (float)(a1->m_width * 0.5) + 15.0, v14);
SetupTriggerPopup::goToPage(a1, 0, 0);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}