//
// SetupAreaAnimTriggerPopup::init from 0x55b10c to 0x55bf9a (3726 bytes)
//
// 1 xrefs:
// > SetupAreaAnimTriggerPopup::create @ 0x55c050
//
// 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 SetupAreaAnimTriggerPopup::init(
SetupAreaAnimTriggerPopup *a1,
EnterEffectObject *a2,
cocos2d::CCArray *a3,
int a4)
{
_BOOL4 v6; // r11
cocos2d::CCDirector *v7; // r0
cocos2d::CCPoint *v8; // r0
cocos2d::CCSprite *v9; // r0
CCMenuItemSpriteExtra *v10; // r0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCObject *v12; // r0
SetupAreaAnimTriggerPopup_vtbl *v13; // r3
void (__fastcall *valueDidChange)(SetupAreaAnimTriggerPopup *__hidden, int, float); // r3
float v15; // r2
cocos2d::CCMenu *m_buttonMenu; // [sp+34h] [bp-48h]
CCMenuItemSpriteExtra *m_hsvButton; // [sp+3Ch] [bp-40h]
cocos2d::CCSize v19; // [sp+44h] [bp-38h] BYREF
cocos2d::CCPoint v20; // [sp+4Ch] [bp-30h] BYREF
cocos2d::CCPoint v21; // [sp+54h] [bp-28h] BYREF
cocos2d::CCPoint v22; // [sp+5Ch] [bp-20h] BYREF
cocos2d::CCPoint v23; // [sp+64h] [bp-18h] BYREF
cocos2d::CCPoint v24; // [sp+6Ch] [bp-10h] BYREF
v6 = SetupTriggerPopup::init(a1, a2, a3, 420.0, 280.0, 1);
if ( v6 )
{
a1->determineStartValues(a1);
sub_776584((int)&v24, "Area Anim Trigger");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v24);
sub_776584((int)&v24, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v24);
sub_774008(&v24);
sub_776584((int)&v23, "Help");
sub_776584(
(int)&v24,
"Edits the properties of an Area trigger.\n"
"Use Group ID or Effect ID to link to the correct one.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v23, (int)&v24, 1065353216);
sub_774008(&v24);
sub_774008(&v23);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
v7 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v19, v7);
cocos2d::CCPoint::CCPoint(&v20, v19.width * 0.5, (float)(v19.height * 0.5) + 96.0);
sub_776584((int)&v22, "Length");
cocos2d::CCPoint::CCPoint(&v23, -90.0, 0.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
222,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, 0.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
223,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "Offset");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -22.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
220,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -22.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
221,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "OffsetY");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -44.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
252,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -44.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
253,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "ModFront");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -66.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
263,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
10.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "BK");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -66.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
264,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
10.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "Duration");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -88.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
10,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
2.0,
0,
0,
1,
2,
0);
sub_774008(&v22);
sub_776584((int)&v22, "DeadZ");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -88.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
282,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "Easing");
cocos2d::CCPoint::CCPoint(&v23, -112.0, -154.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupTriggerPopup::createCustomEasingControls(
a1,
(int)&v22,
&v24,
(cocos2d::CCFloat *)0x3F333333,
(cocos2d::CCInteger *)((char *)&dword_F0 + 2),
(cocos2d::CCInteger *)((char *)&dword_F0 + 3),
0,
0);
sub_774008(&v22);
sub_776584((int)&v22, "GroupID");
if ( a4 == 3011 )
{
cocos2d::CCPoint::CCPoint(&v23, 90.0, -176.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
51,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
1,
Uint,
6,
1,
nullptr,
100.0,
1,
0,
1,
2,
0);
}
else
{
cocos2d::CCPoint::CCPoint(&v23, 110.0, -176.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
51,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
1,
Uint,
6,
1,
nullptr,
100.0,
1,
0,
0,
2,
0);
}
sub_774008(&v22);
sub_776584((int)&v23, "Use\nEID");
cocos2d::CCPoint::CCPoint(
&v24,
(float)(v19.width * 0.5) + 60.0,
(float)((float)(v19.height * 0.5) - (float)(a1->m_height * 0.5)) + 20.0);
SetupTriggerPopup::createToggleValueControl(a1, 355, (int)&v23, &v24, 0, 0, 0, 1.0);
sub_774008(&v23);
switch ( a4 )
{
case 3011:
sub_776584((int)&v22, "MoveDist");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
218,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
100.0,
0,
1,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
219,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
100.0,
0,
1,
1);
sub_774008(&v22);
sub_776584((int)&v22, "MoveAngle");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -132.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
231,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
200.0,
0,
1,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -132.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
232,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
200.0,
0,
1,
1);
sub_774008(&v22);
sub_776584((int)&v23, "XY\nMode");
cocos2d::CCPoint::CCPoint(
&v24,
(float)((float)(a1->m_width * 0.5) + (float)(v19.width * 0.5)) - 58.0,
(float)((float)(a1->m_height * 0.5) + (float)(v19.height * 0.5)) - 20.0);
SetupTriggerPopup::createToggleValueControl(a1, 241, (int)&v23, &v24, 0, 0, 0, 1.0);
sub_774008(&v23);
sub_776584((int)&v22, "RFade");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -154.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
288,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
60.0,
0,
1,
1);
sub_774008(&v22);
sub_776584((int)&v22, "MoveX");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
237,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
100.0,
0,
2,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
238,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
100.0,
0,
2,
1);
sub_774008(&v22);
sub_776584((int)&v22, "MoveY");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -132.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
239,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
200.0,
0,
2,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -132.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
240,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
200.0,
0,
2,
1);
v8 = &v22;
goto LABEL_12;
case 3012:
sub_776584((int)&v22, "Rotation");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
270,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xC3B40000,
360.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
271,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
180.0,
0,
0,
1);
goto LABEL_10;
case 3013:
sub_776584((int)&v22, "ScaleX");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
233,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
234,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
100.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "ScaleY");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -132.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
235,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
200.0,
0,
0,
1);
sub_774008(&v22);
sub_776584((int)&v22, "+-");
cocos2d::CCPoint::CCPoint(&v23, 90.0, -132.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
236,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
200.0,
0,
0,
1);
goto LABEL_10;
case 3014:
sub_776584((int)&v22, "Opacity");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
275,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
0,
1);
LABEL_10:
v8 = &v22;
goto LABEL_12;
case 3015:
sub_776584((int)&v22, "Tint %");
cocos2d::CCPoint::CCPoint(&v23, -90.0, -110.0);
cocos2d::CCPoint::operator+(&v24, &v20, &v23);
SetupAreaAnimTriggerPopup::createValueControlAdvancedAnim(
a1,
265,
(int)&v22,
&v24,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
1,
1);
sub_774008(&v22);
v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hsvBtn_001.png");
LODWORD(v24.x) = SetupAreaTintTriggerPopup::onHSV;
v24.y = 0.0;
v10 = CCMenuItemSpriteExtra::create(
v9,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SetupAreaTintTriggerPopup::onHSV, (unsigned int)a1));
a1->m_hsvButton = v10;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v10);
m_hsvButton = a1->m_hsvButton;
setPosition = m_hsvButton->setPosition;
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v21, 75.0, -120.0);
cocos2d::CCPoint::operator+(&v22, &v20, &v21);
cocos2d::CCNode::convertToNodeSpace(&v23, m_buttonMenu, &v22);
setPosition(m_hsvButton, &v23);
SetupAreaTintTriggerPopup::updateHSVButton(a1);
sub_776584((int)&v21, "Edit\nHSV");
cocos2d::CCPoint::CCPoint(&v22, 125.0, -120.0);
cocos2d::CCPoint::operator+(&v23, &v20, &v22);
SetupTriggerPopup::createToggleValueControl(a1, 278, (int)&v21, &v23, 0, 0, 0, 1.0);
v8 = &v21;
LABEL_12:
sub_774008(v8);
break;
default:
break;
}
a1->updateDefaultTriggerValues(a1);
if ( a4 == 3011 )
{
v12 = cocos2d::CCDictionary::objectForKey(a1->m_triggerValues, 241);
v13 = a1->SetupAreaTintTriggerPopup::SetupAreaMoveTriggerPopup::SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( v12 )
{
valueDidChange = v13->valueDidChange;
if ( *(float *)&v12[1].__vftable == 0.0 )
v15 = 0.0;
else
v15 = 1.0;
((void (__fastcall *)(SetupAreaAnimTriggerPopup *, int, _DWORD))valueDidChange)(a1, 241, LODWORD(v15));
}
else
{
v13->toggleGroup(a1, 1, 0);
a1->toggleGroup(a1, 2, 0);
}
}
a1->m_disableTextDelegate = 0;
}
return v6;
}