//
// SetupTriggerPopup::createCustomEasingControls from 0x545dfc to 0x54631c (1312 bytes)
//
// 4 xrefs:
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x558944
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x5589e4
// > SetupAreaAnimTriggerPopup::init @ 0x55b606
// > SetupEnterEffectPopup::init @ 0x55d468
//
// 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
//
void __fastcall SetupTriggerPopup::createCustomEasingControls(
SetupTriggerPopup *a1,
int a2,
const cocos2d::CCPoint *a3,
cocos2d::CCFloat *a4,
cocos2d::CCInteger *a5,
cocos2d::CCInteger *a6,
int a7,
int a8)
{
cocos2d::CCArray *PageContainer; // r10
cocos2d::CCArray *GroupContainer; // r0
cocos2d::CCDictionary *m_customEasingTags; // r8
cocos2d::CCArray *v14; // r9
int v15; // r1
cocos2d::CCObject *v16; // r0
cocos2d::CCDictionary *v17; // r8
int v18; // r1
cocos2d::CCObject *v19; // r0
cocos2d::CCDictionary *m_customEasingScales; // r8
float v21; // r1
cocos2d::CCObject *v22; // r0
float v23; // s17
cocos2d::CCLabelBMFont *v24; // r7
cocos2d::CCLabelBMFont *v25; // r6
int v26; // r11
float v27; // s19
cocos2d::CCSprite *v28; // r5
cocos2d::CCLabelBMFont *v29; // r8
CCMenuItemSpriteExtra *v30; // r5
int v31; // r8
float *v32; // r0
cocos2d::CCSprite *v33; // r5
CCMenuItemSpriteExtra *v34; // r5
int v35; // r11
cocos2d::CCSprite *v36; // r5
CCMenuItemSpriteExtra *v37; // r5
void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
int v39; // r8
float v40; // r0
float v41; // r0
cocos2d::CCPoint *setPosition; // [sp+8h] [bp-4Ch]
cocos2d::CCPoint *v43; // [sp+8h] [bp-4Ch]
cocos2d::CCNode *v44; // [sp+8h] [bp-4Ch]
cocos2d::CCPoint *v45; // [sp+Ch] [bp-48h]
cocos2d::CCNode *v46; // [sp+Ch] [bp-48h]
cocos2d::CCPoint *v47; // [sp+14h] [bp-40h]
cocos2d::CCNode *m_buttonMenu; // [sp+14h] [bp-40h]
cocos2d::CCPoint v49; // [sp+1Ch] [bp-38h] BYREF
cocos2d::CCPoint v50; // [sp+24h] [bp-30h] BYREF
cocos2d::CCPoint v51; // [sp+2Ch] [bp-28h] BYREF
cocos2d::CCPoint v52; // [sp+34h] [bp-20h] BYREF
cocos2d::CCPoint v53; // [sp+3Ch] [bp-18h] BYREF
cocos2d::CCPoint v54; // [sp+44h] [bp-10h] BYREF
PageContainer = SetupTriggerPopup::getPageContainer(a1, a7);
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a8);
m_customEasingTags = a1->m_customEasingTags;
v14 = GroupContainer;
v16 = cocos2d::CCInteger::create(a6, v15);
cocos2d::CCDictionary::setObject(m_customEasingTags, v16, (intptr_t)a5);
v17 = a1->m_customEasingTags;
v19 = cocos2d::CCInteger::create(a5, v18);
cocos2d::CCDictionary::setObject(v17, v19, (intptr_t)a6);
m_customEasingScales = a1->m_customEasingScales;
v22 = cocos2d::CCFloat::create(a4, v21);
cocos2d::CCDictionary::setObject(m_customEasingScales, v22, (intptr_t)a5);
v23 = *(float *)&a4 * 0.7;
v24 = cocos2d::CCLabelBMFont::create();
v24->setPosition(v24, a3);
a1->m_mainLayer->addChild(a1->m_mainLayer, v24);
cocos2d::CCArray::addObject(PageContainer, v24);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v24);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v24->setScale)(v24, *(float *)&a4 * 0.8);
v25 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v25);
cocos2d::CCArray::addObject(PageContainer, v25);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v25);
setPosition = (cocos2d::CCPoint *)v25->setPosition;
v26 = (int)v24->getPosition(v24);
cocos2d::CCPoint::CCPoint(&v53, 0.0, -(float)(*(float *)&a4 * 30.0));
cocos2d::CCPoint::operator+(&v54, v26, &v53);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *))setPosition)(v25, &v54);
v25->setScale(v25, COERCE_FLOAT(LODWORD(v23)));
cocos2d::CCDictionary::setObject(a1->m_customEasingLabels, v25, (intptr_t)a5);
v27 = *(float *)&a4 * 100.0;
v28 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png");
v28->setColor(v28, &stru_9AD3D8);
v28->setOpacity(v28, 100);
cocos2d::CCArray::addObject(PageContainer, v28);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v28);
v29 = cocos2d::CCLabelBMFont::create();
v28->addChild(v28, v29);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v29->setScaleX)(
v29,
(float)(*(float *)&a4 * 0.3) / (float)(*(float *)&a4 * 0.8));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v29->setScaleY)(
v29,
(float)(*(float *)&a4 * 0.3) / (float)(*(float *)&a4 * 0.4));
cocos2d::CCArray::addObject(PageContainer, v29);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v29);
v47 = (cocos2d::CCPoint *)v29->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v52, v28, &stru_AC78A4);
cocos2d::CCPoint::CCPoint(&v53, 1.0, 1.5);
cocos2d::CCPoint::operator+(&v54, &v52, &v53);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *))v47)(v29, &v54);
cocos2d::CCDictionary::setObject(a1->m_customEasingLabels, v29, (intptr_t)a6);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v28->setScaleX)(v28, *(float *)&a4 * 0.8);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v28->setScaleY)(v28, *(float *)&a4 * 0.4);
LODWORD(v52.x) = SetupTriggerPopup::onCustomEaseRate;
v52.y = 0.0;
v30 = CCMenuItemSpriteExtra::create(
v28,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SetupTriggerPopup::onCustomEaseRate, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v30);
v45 = (cocos2d::CCPoint *)v30->setPosition;
m_buttonMenu = a1->m_buttonMenu;
v31 = (int)v24->getPosition(v24);
v32 = (float *)v24->getContentSize(v24);
cocos2d::CCPoint::CCPoint(&v51, (float)((float)(*v32 * 0.5) + 10.0) * *(float *)&a4, *(float *)&a4 * -2.0);
cocos2d::CCPoint::operator+(&v53, v31, &v51);
cocos2d::CCNode::convertToNodeSpace(&v54, m_buttonMenu, &v53);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v45)(v30, &v54);
CCMenuItemSpriteExtra::setSizeMult(v30, 1.2);
v30->setTag(v30, (int)a6);
cocos2d::CCDictionary::setObject(a1->m_customEasingButtons, v30, (intptr_t)a6);
cocos2d::CCArray::addObject(PageContainer, v30);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v30);
v33 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v33, 1);
v33->setScale(v33, COERCE_FLOAT(LODWORD(v23)));
LODWORD(v53.x) = SetupTriggerPopup::onCustomEaseArrowUp;
v53.y = 0.0;
v34 = CCMenuItemSpriteExtra::create(
v33,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SetupTriggerPopup::onCustomEaseArrowUp, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v34);
v43 = (cocos2d::CCPoint *)v34->setPosition;
v46 = a1->m_buttonMenu;
v35 = (int)v25->getPosition(v25);
cocos2d::CCPoint::CCPoint(&v50, v27, 0.0);
cocos2d::CCPoint::operator+(&v51, v35, &v50);
cocos2d::CCNode::convertToNodeSpace(&v54, v46, &v51);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v43)(v34, &v54);
CCMenuItemSpriteExtra::setSizeMult(v34, 1.4);
v34->setTag(v34, (int)a5);
cocos2d::CCArray::addObject(PageContainer, v34);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v34);
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v36->setScale(v36, COERCE_FLOAT(LODWORD(v23)));
LODWORD(v54.x) = SetupTriggerPopup::onCustomEaseArrowDown;
v54.y = 0.0;
v37 = CCMenuItemSpriteExtra::create(
v36,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SetupTriggerPopup::onCustomEaseArrowDown, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v37);
v38 = v37->setPosition;
v44 = a1->m_buttonMenu;
v39 = (int)v25->getPosition(v25);
cocos2d::CCPoint::CCPoint(&v49, -v27, 0.0);
cocos2d::CCPoint::operator+(&v50, v39, &v49);
cocos2d::CCNode::convertToNodeSpace(&v51, v44, &v50);
v38(v37, &v51);
CCMenuItemSpriteExtra::setSizeMult(v37, 1.4);
v37->setTag(v37, (int)a5);
cocos2d::CCArray::addObject(PageContainer, v37);
if ( a8 > 0 )
cocos2d::CCArray::addObject(v14, v37);
v40 = a1->getValue(a1, (int)a5);
SetupTriggerPopup::updateCustomEaseLabel(a1, (int)a5, (int)v40);
v41 = a1->getValue(a1, (int)a6);
SetupTriggerPopup::updateCustomEaseRateLabel(a1, (int)a6, v41);
SetupTriggerPopup::toggleCustomEaseRateVisibility(a1, (int)a5, (int)a6);
}