//
// SetupAnimSettingsPopup::init from 0x4f3ba8 to 0x4f3fc2 (1050 bytes)
//
// 1 xrefs:
// > SetupAnimSettingsPopup::create @ 0x4f413a
//
// 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 SetupAnimSettingsPopup::init(SetupAnimSettingsPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
_BYTE v7[4]; // [sp+40h] [bp-34h] BYREF
cocos2d::CCSize v8; // [sp+44h] [bp-30h] BYREF
cocos2d::CCPoint v9; // [sp+4Ch] [bp-28h] BYREF
_BYTE v10[8]; // [sp+54h] [bp-20h] BYREF
cocos2d::CCPoint v11; // [sp+5Ch] [bp-18h] BYREF
cocos2d::CCPoint v12; // [sp+64h] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 400.0, 240.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)&v12, "Edit Animation Settings");
SetupTriggerPopup::addTitle(a1, (std::string)&v12);
sub_774008(&v12);
sub_776584((int)&v12, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v12);
sub_774008(&v12);
sub_776584((int)&v11, "Help");
sub_776584(
(int)&v12,
"Disable Anim Shine removes the white flash at the start of the animation for some animated objects.\n"
"Use Speed lets you set a custom animation speed.\n"
"Use Animate On Trigger to toggle on with Animate trigger.\n"
"Only If Active only does this if the object is active.\n"
"Single Frame lets you select a specific frame of the animation.\n"
"Offset Anim will offset the animation the value of single frame.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v11, (std::string)&v12, 1.0);
sub_774008(&v12);
sub_774008(&v11);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v8, v5);
cocos2d::CCPoint::CCPoint(&v9, v8.width * 0.5, v8.height * 0.5);
cocos2d::CCPoint::CCPoint(&v12, -40.0, 60.0);
cocos2d::CCPoint::operator+(v10, &v9, &v12);
sub_776584((int)v7, "Randomize\nStart");
cocos2d::CCPoint::CCPoint(&v11, -125.0, 0.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 106, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Use\nSpeed");
cocos2d::CCPoint::CCPoint(&v11, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 122, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Animate\non Trigger");
cocos2d::CCPoint::CCPoint(&v11, 125.0, 0.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 123, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Disable\ndelayed\nloop");
cocos2d::CCPoint::CCPoint(&v11, -125.0, -40.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 126, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Disable\nAnimShine");
cocos2d::CCPoint::CCPoint(&v11, 0.0, -40.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 127, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Only if\nactive");
cocos2d::CCPoint::CCPoint(&v11, 125.0, -40.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 214, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Speed:");
cocos2d::CCPoint::CCPoint(&v11, -100.0, -30.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
107,
(int)v7,
(int)&v12,
0.8,
0,
1,
6,
0,
(cocos2d::CCFloat *)0xC0000000,
2.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Single Frame:");
cocos2d::CCPoint::CCPoint(&v11, 100.0, -45.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
462,
(int)v7,
(int)&v12,
0.8,
1,
3,
3,
1,
nullptr,
20.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Offset\nAnim");
cocos2d::CCPoint::CCPoint(&v11, 125.0, -155.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl((int)a1, 592, (int)v7, (int)&v12, 0, 0, 0, 1.0);
sub_774008(v7);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}