//
// SetupAreaTintTriggerPopup::init from 0x55a5a0 to 0x55ab3e (1438 bytes)
//
// 1 xrefs:
// > SetupAreaTintTriggerPopup::create @ 0x55abe4
//
// 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 SetupAreaTintTriggerPopup::init(SetupAreaTintTriggerPopup *a1, EnterEffectObject *a2, cocos2d::CCArray *a3)
{
_BOOL4 v4; // r10
cocos2d::CCDirector *v5; // r0
cocos2d::CCSprite *v6; // r0
CCMenuItemSpriteExtra *v7; // r0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
void (__fastcall *toggleGroup)(SetupTriggerPopup *__hidden, int, bool); // r5
float v10; // s15
void (__fastcall *v11)(SetupTriggerPopup *__hidden, int, bool); // r5
float v12; // r0
cocos2d::CCMenu *m_buttonMenu; // [sp+34h] [bp-48h]
CCMenuItemSpriteExtra *m_hsvButton; // [sp+3Ch] [bp-40h]
cocos2d::CCSize v16; // [sp+44h] [bp-38h] BYREF
cocos2d::CCPoint v17; // [sp+4Ch] [bp-30h] BYREF
cocos2d::CCPoint v18; // [sp+54h] [bp-28h] BYREF
cocos2d::CCPoint v19; // [sp+5Ch] [bp-20h] BYREF
cocos2d::CCPoint v20; // [sp+64h] [bp-18h] BYREF
cocos2d::CCPoint v21; // [sp+6Ch] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 420.0, 280.0, 1);
if ( v4 )
{
a1->determineStartValues(a1);
sub_776584((int)&v21, "Area Tint Trigger");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v21);
sub_776584((int)&v21, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v21);
sub_774008(&v21);
sub_776584((int)&v20, "Help");
sub_776584(
(int)&v21,
"Tints objects using Target Group ID within an area around Center Group ID. The area can be specifi"
"ed by the arrow buttons and Length (for size).\n"
"You can specify how much the objects in the area tint depending on how close they are to the center.\n"
"Check the other pages for more settings.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v20, (int)&v21, 1065353216);
sub_774008(&v21);
sub_774008(&v20);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v16, v5);
cocos2d::CCPoint::CCPoint(&v17, v16.width * 0.5, (float)(v16.height * 0.5) + 95.0);
sub_776584((int)&v19, "Length");
cocos2d::CCPoint::CCPoint(&v20, -75.0, 0.0);
cocos2d::CCPoint::operator+(&v21, &v17, &v20);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
222,
(int)&v19,
&v21,
(cocos2d::CCZone *)0x3F266666,
0,
Int,
6,
0,
nullptr,
100.0,
0,
0,
1,
2,
0);
sub_774008(&v19);
sub_776584((int)&v19, "+-");
cocos2d::CCPoint::CCPoint(&v20, 75.0, 0.0);
cocos2d::CCPoint::operator+(&v21, &v17, &v20);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
223,
(int)&v19,
&v21,
(cocos2d::CCZone *)0x3F266666,
0,
Int,
6,
0,
nullptr,
100.0,
0,
0,
1,
2,
0);
sub_774008(&v19);
sub_776584((int)&v19, "Offset");
cocos2d::CCPoint::CCPoint(&v20, -75.0, -25.0);
cocos2d::CCPoint::operator+(&v21, &v17, &v20);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
220,
(int)&v19,
&v21,
(cocos2d::CCZone *)0x3F266666,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
1,
2,
0);
sub_774008(&v19);
sub_776584((int)&v19, "+-");
cocos2d::CCPoint::CCPoint(&v20, 75.0, -25.0);
cocos2d::CCPoint::operator+(&v21, &v17, &v20);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
221,
(int)&v19,
&v21,
(cocos2d::CCZone *)0x3F266666,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC2C80000,
100.0,
0,
0,
1,
2,
0);
sub_774008(&v19);
sub_776584((int)&v19, "Color Channel:");
cocos2d::CCPoint::CCPoint(&v20, -75.0, -75.0);
cocos2d::CCPoint::operator+(&v21, &v17, &v20);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
260,
(int)&v19,
&v21,
(cocos2d::CCZone *)0x3F266666,
1,
Uint,
6,
1,
nullptr,
100.0,
0,
1,
0,
2,
0);
sub_774008(&v19);
sub_776584((int)&v19, "Tint");
cocos2d::CCPoint::CCPoint(&v20, 75.0, -75.0);
cocos2d::CCPoint::operator+(&v21, &v17, &v20);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
265,
(int)&v19,
&v21,
(cocos2d::CCZone *)0x3F266666,
0,
Float,
6,
0,
nullptr,
1.0,
0,
1,
1,
2,
0);
sub_774008(&v19);
v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hsvBtn_001.png");
LODWORD(v21.x) = SetupAreaTintTriggerPopup::onHSV;
v21.y = 0.0;
v7 = CCMenuItemSpriteExtra::create(
v6,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SetupAreaTintTriggerPopup::onHSV, (unsigned int)a1));
a1->m_hsvButton = v7;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v7);
m_hsvButton = a1->m_hsvButton;
setPosition = m_hsvButton->setPosition;
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v18, 0.0, -75.0);
cocos2d::CCPoint::operator+(&v19, &v17, &v18);
cocos2d::CCNode::convertToNodeSpace(&v20, m_buttonMenu, &v19);
setPosition(m_hsvButton, &v20);
SetupTriggerPopup::addObjectToGroup(a1, a1->m_hsvButton, 2);
SetupTriggerPopup::addObjectToPage(a1, a1->m_hsvButton, 0);
SetupAreaTintTriggerPopup::updateHSVButton(a1);
sub_776584((int)&v18, "Main\nOnly");
cocos2d::CCPoint::CCPoint(&v19, -140.0, -125.0);
cocos2d::CCPoint::operator+(&v20, &v17, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 65, (int)&v18, &v20, 0, 0, 0, 1.0);
sub_774008(&v18);
sub_776584((int)&v18, "Secondary\nOnly");
cocos2d::CCPoint::CCPoint(&v19, -20.0, -125.0);
cocos2d::CCPoint::operator+(&v20, &v17, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 66, (int)&v18, &v20, 0, 0, 0, 1.0);
sub_774008(&v18);
sub_776584((int)&v18, "HSV");
cocos2d::CCPoint::CCPoint(&v19, 100.0, -125.0);
cocos2d::CCPoint::operator+(&v20, &v17, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 278, (int)&v18, &v20, 0, 0, 0, 1.0);
sub_774008(&v18);
SetupAreaMoveTriggerPopup::addAreaDefaultControls(a1, 3010);
a1->updateDefaultTriggerValues(a1);
SetupTriggerPopup::createPageButtons(a1, (float)(a1->m_width * 0.5) + 15.0, 1);
toggleGroup = a1->toggleGroup;
v10 = COERCE_FLOAT(((int (__fastcall *)(SetupAreaTintTriggerPopup *, int))a1->getValue)(a1, 278));
toggleGroup(a1, 1, v10 == 0.0);
v11 = a1->toggleGroup;
v12 = COERCE_FLOAT(((int (__fastcall *)(SetupAreaTintTriggerPopup *, int))a1->getValue)(a1, 278));
v11(a1, 2, v12 != 0.0);
SetupTriggerPopup::goToPage(a1, 0, 0);
a1->m_disableTextDelegate = 0;
}
return v4;
}