//
// SetupTriggerPopup::createEasingControls from 0x14047c260 to 0x14047cad8 (2168 bytes)
//
// 24 xrefs:
// > SetupMoveCommandPopup::init @ 0x140281af4
// > SetupRotateCommandPopup::init @ 0x1402a87cd
// > SetupCameraRotatePopup2::init @ 0x14041802d
// > SetupKeyframePopup::init @ 0x14042598e
// > SetupShaderEffectPopup::setupShockWave @ 0x14044c42b
// > SetupShaderEffectPopup::setupShockLine @ 0x14044d657
// > SetupShaderEffectPopup::setupChromatic @ 0x14044e322
// > SetupShaderEffectPopup::setupChromaticGlitch @ 0x14044ebb6
// > SetupShaderEffectPopup::setupPixelate @ 0x14044f266
// > SetupShaderEffectPopup::setupLensCircle @ 0x14044fbb3
// > SetupShaderEffectPopup::setupRadialBlur @ 0x1404505f0
// > SetupShaderEffectPopup::setupMotionBlur @ 0x14045115f
// > SetupShaderEffectPopup::setupBulge @ 0x140451a36
// > SetupShaderEffectPopup::setupPinch @ 0x14045261f
// > SetupShaderEffectPopup::setupGrayscale @ 0x140452b3a
// > SetupShaderEffectPopup::setupSepia @ 0x140452e65
// > SetupShaderEffectPopup::setupInvertColor @ 0x1404534d0
// > SetupShaderEffectPopup::setupHueShift @ 0x140453825
// > SetupShaderEffectPopup::setupColorChange @ 0x140453e35
// > SetupShaderEffectPopup::setupSplitScreen @ 0x140454592
// > SetupStaticCameraPopup::init @ 0x140460644
// > SetupTransformPopup::init @ 0x140465677
// > SetupZoomTriggerPopup::init @ 0x14047e51b
// > ??> @ 0x1406db858
//
// 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 SetupTriggerPopup::createEasingControls(SetupTriggerPopup *a1, cocos2d::CCPoint a2, float a3, int a4, int a5)
{
__int64 v7; // rcx
struct cocos2d::CCObject *v8; // rax
ButtonSprite *v9; // r8
cocos2d::CCPoint v10; // r9
struct cocos2d::CCObject *v11; // rax
int v12; // r15d
SetupTriggerPopup *v13; // r12
cocos2d::CCArray *GroupContainer; // rax
SetupTriggerPopup *v15; // rbp
struct cocos2d::CCLabelBMFont *v16; // r14
ButtonSprite *v17; // r8
cocos2d::CCPoint v18; // r9
cocos2d::CCLabelBMFont *v19; // rax
cocos2d::CCLayer *m_mainLayer; // rcx
float v21; // xmm0_4
__int64 v22; // rax
ButtonSprite *v23; // r8
cocos2d::CCPoint v24; // r9
float v25; // xmm11_4
struct cocos2d::CCSprite *v26; // rdi
__int64 v27; // rdx
cocos2d::CCLabelBMFont *v28; // rax
float v29; // xmm0_4
struct cocos2d::CCPoint v30; // rax
CCMenuItemSpriteExtra *v31; // rax
cocos2d::CCMenu *m_buttonMenu; // rcx
float v33; // xmm0_4
__int64 v34; // rax
CCMenuItemSpriteExtra *m_easingRateButton; // rbx
CCMenuItemSpriteExtra_vtbl *v36; // rdi
struct cocos2d::CCPoint v37; // rax
ButtonSprite *v38; // r8
cocos2d::CCPoint v39; // r9
cocos2d::CCSprite *v40; // rbx
struct cocos2d::CCObject *v41; // rdi
float v42; // xmm0_4
const cocos2d::CCPoint *v43; // rax
cocos2d::CCObject_vtbl *v44; // rbx
struct cocos2d::CCPoint v45; // rax
cocos2d::CCObject_vtbl *v46; // rax
ButtonSprite *v47; // r8
cocos2d::CCPoint v48; // r9
struct cocos2d::CCSprite *v49; // rbx
struct cocos2d::CCObject *v50; // rdi
float v51; // xmm0_4
const cocos2d::CCPoint *v52; // rax
cocos2d::CCObject_vtbl *v53; // rbx
struct cocos2d::CCPoint v54; // rax
cocos2d::CCObject_vtbl *v55; // rax
ButtonSprite *v56; // r8
cocos2d::CCPoint v57; // r9
__int64 v58; // rcx
bool v59; // zf
cocos2d::CCArray *m_gameObjects; // rbx
ButtonSprite *v61; // r8
cocos2d::CCPoint v62; // r9
cocos2d::ccArray *data; // rdx
EasingType v64; // ecx
float v65; // xmm0_4
__int64 num; // rax
cocos2d::CCObject **arr; // rdx
cocos2d::CCObject **v68; // r9
cocos2d::CCObject *v69; // rax
cocos2d::CCObject *v70; // rax
cocos2d::CCObject *v71; // rax
cocos2d::CCObject *v72; // rax
cocos2d::CCObject *v73; // rax
struct cocos2d::CCPoint v74; // [rsp+20h] [rbp-98h] BYREF
struct cocos2d::CCPoint v75; // [rsp+28h] [rbp-90h] BYREF
char v76; // [rsp+C0h] [rbp+8h] BYREF
while ( !cocos2d::CCArray::count(a1->m_pageContainers) )
{
v8 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v7);
cocos2d::CCArray::addObject((SetupTriggerPopup *)a1->m_pageContainers, v8, v9, v10);
}
v11 = cocos2d::CCArray::objectAtIndex(a1->m_pageContainers, 0);
v12 = a5;
v13 = (SetupTriggerPopup *)v11;
GroupContainer = SetupTriggerPopup::getGroupContainer(a1, a5);
a1->m_easingControlScale = a3;
v15 = (SetupTriggerPopup *)GroupContainer;
v16 = cocos2d::CCLabelBMFont::create((const char *)&dword_14057CC60, "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *, cocos2d::CCPoint))v16->setPosition_0)(v16, a2);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v16);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v16->setScale_0)(v16);
if ( v12 > 0 )
cocos2d::CCArray::addObject(v15, v16, v17, v18);
cocos2d::CCArray::addObject(v13, v16, v17, v18);
v19 = cocos2d::CCLabelBMFont::create(" ", &qword_14052A4D8);
m_mainLayer = a1->m_mainLayer;
a1->m_easingLabel = v19;
v21 = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))m_mainLayer->addChild_1)(m_mainLayer, v19);
cocos2d::CCPoint::CCPoint(v21, 0.0);
v22 = (__int64)v16->getPosition_0(v16);
cocos2d::CCPoint::operator+(v22, &v76);
a1->m_easingLabel->setPosition_0(a1->m_easingLabel, (const cocos2d::CCPoint *)&v76);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_easingLabel->setScale_0)(a1->m_easingLabel);
if ( v12 > 0 )
cocos2d::CCArray::addObject(v15, a1->m_easingLabel, v23, v24);
cocos2d::CCArray::addObject(v13, a1->m_easingLabel, v23, v24);
v25 = a3 * 100.0;
v26 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png");
v26->setColor(&v26->cocos2d::CCRGBAProtocol, &stru_140529C60);
LOBYTE(v27) = 100;
v26->setOpacity(&v26->cocos2d::CCRGBAProtocol, v27);
v28 = cocos2d::CCLabelBMFont::create("0", &qword_14052A4D8);
a1->m_easingRateLabel = v28;
v26->addChild_1(v26, v28);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_easingRateLabel->setScaleX)(a1->m_easingRateLabel);
v29 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_easingRateLabel->setScaleY)(a1->m_easingRateLabel);
cocos2d::CCPoint::CCPoint(v29, 1.0);
v30 = cocos2d::CCNode::convertToNodeSpace(v26, &v75);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(v30, &v76);
a1->m_easingRateLabel->setPosition_0(a1->m_easingRateLabel, (const cocos2d::CCPoint *)&v76);
((void (__fastcall *)(struct cocos2d::CCSprite *))v26->setScaleX)(v26);
((void (__fastcall *)(struct cocos2d::CCSprite *))v26->setScaleY)(v26);
v31 = CCMenuItemSpriteExtra::create(v26, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onEaseRate);
m_buttonMenu = a1->m_buttonMenu;
a1->m_easingRateButton = v31;
v33 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))m_buttonMenu->addChild_1)(m_buttonMenu, v31);
cocos2d::CCPoint::CCPoint(v33, a3 * 55.0);
v34 = (__int64)v16->getPosition_0(v16);
cocos2d::CCPoint::operator+(v34, &v76);
m_easingRateButton = a1->m_easingRateButton;
v36 = m_easingRateButton->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v37 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v74);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v36->setPosition_0)(m_easingRateButton, v37);
HIDWORD(a1->m_easingRateButton->m_pfnSelector.adj) = 1067030938;
if ( v12 > 0 )
cocos2d::CCArray::addObject(v15, a1->m_easingRateButton, v38, v39);
cocos2d::CCArray::addObject(v13, a1->m_easingRateButton, v38, v39);
v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v40, 1);
((void (__fastcall *)(cocos2d::CCSprite *))v40->setScale_0)(v40);
v41 = CCMenuItemSpriteExtra::create(v40, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onEase);
v42 = ((float (__fastcall *)(cocos2d::CCMenu *, struct cocos2d::CCObject *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v41);
cocos2d::CCPoint::CCPoint(v42, v25);
v43 = a1->m_easingLabel->getPosition_0(a1->m_easingLabel);
cocos2d::CCPoint::operator+(v43, &v76);
v44 = v41->__vftable;
v45 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v74);
((void (__fastcall *)(struct cocos2d::CCObject *, struct cocos2d::CCPoint))v44[2].encodeWithCoder)(v41, v45);
v46 = v41->__vftable;
v41[6].m_uUnknown = 1068708659;
v46->setTag(v41, 1);
if ( v12 > 0 )
cocos2d::CCArray::addObject(v15, v41, v47, v48);
cocos2d::CCArray::addObject(v13, v41, v47, v48);
v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v49->setScale_0)(v49);
v50 = CCMenuItemSpriteExtra::create(v49, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupTriggerPopup::onEase);
v51 = ((float (__fastcall *)(cocos2d::CCMenu *, struct cocos2d::CCObject *))a1->m_buttonMenu->addChild_1)(
a1->m_buttonMenu,
v50);
cocos2d::CCPoint::CCPoint(v51, -v25);
v52 = a1->m_easingLabel->getPosition_0(a1->m_easingLabel);
cocos2d::CCPoint::operator+(v52, &v76);
v53 = v50->__vftable;
v54 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v74);
((void (__fastcall *)(struct cocos2d::CCObject *, struct cocos2d::CCPoint))v53[2].encodeWithCoder)(v50, v54);
v55 = v50->__vftable;
v50[6].m_uUnknown = 1068708659;
v55->setTag(v50, 0);
if ( v12 > 0 )
cocos2d::CCArray::addObject(v15, v50, v56, v57);
cocos2d::CCArray::addObject(v13, v50, v56, v57);
v59 = a1->m_gameObject == nullptr;
a1->m_easingType = -99999;
a1->m_easingRate = -99999.0;
if ( v59 )
{
m_gameObjects = a1->m_gameObjects;
}
else
{
m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::create(v58);
cocos2d::CCArray::addObject((SetupTriggerPopup *)m_gameObjects, a1->m_gameObject, v61, v62);
}
if ( m_gameObjects )
{
if ( cocos2d::CCArray::count(m_gameObjects) )
{
data = m_gameObjects->data;
v64 = -99999;
v65 = -99999.0;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v68 = &arr[num - 1];
if ( arr <= v68 )
{
if ( ((8 * (num - 1) + 8) & 0xFFFFFFFFFFFFFFF8uLL) < 0x20 )
{
do
{
LABEL_59:
v73 = *arr;
if ( !*arr )
break;
if ( v64 == -99999 )
{
v64 = (EasingType)v73[27].__vftable;
}
else if ( v64 != LODWORD(v73[27].__vftable) )
{
v64 = -99998;
}
if ( v65 == -99999.0 )
{
v65 = *((float *)&v73[27].__vftable + 1);
}
else if ( v65 != *((float *)&v73[27].__vftable + 1) )
{
v65 = -99998.0;
}
++arr;
}
while ( arr <= v68 );
}
else
{
while ( 1 )
{
v69 = *arr;
if ( !*arr )
break;
if ( v64 == -99999 )
{
v64 = (EasingType)v69[27].__vftable;
}
else if ( v64 != LODWORD(v69[27].__vftable) )
{
v64 = -99998;
}
if ( v65 == -99999.0 )
{
v65 = *((float *)&v69[27].__vftable + 1);
}
else if ( v65 != *((float *)&v69[27].__vftable + 1) )
{
v65 = -99998.0;
}
v70 = arr[1];
if ( !v70 )
break;
if ( v64 == -99999 )
{
v64 = (EasingType)v70[27].__vftable;
}
else if ( v64 != LODWORD(v70[27].__vftable) )
{
v64 = -99998;
}
if ( v65 == -99999.0 )
{
v65 = *((float *)&v70[27].__vftable + 1);
}
else if ( v65 != *((float *)&v70[27].__vftable + 1) )
{
v65 = -99998.0;
}
v71 = arr[2];
if ( !v71 )
break;
if ( v64 == -99999 )
{
v64 = (EasingType)v71[27].__vftable;
}
else if ( v64 != LODWORD(v71[27].__vftable) )
{
v64 = -99998;
}
if ( v65 == -99999.0 )
{
v65 = *((float *)&v71[27].__vftable + 1);
}
else if ( v65 != *((float *)&v71[27].__vftable + 1) )
{
v65 = -99998.0;
}
v72 = arr[3];
if ( !v72 )
break;
if ( v64 == -99999 )
{
v64 = (EasingType)v72[27].__vftable;
}
else if ( v64 != LODWORD(v72[27].__vftable) )
{
v64 = -99998;
}
if ( v65 == -99999.0 )
{
v65 = *((float *)&v72[27].__vftable + 1);
}
else if ( v65 != *((float *)&v72[27].__vftable + 1) )
{
v65 = -99998.0;
}
arr += 4;
if ( arr > v68 - 3 )
{
if ( arr > v68 )
break;
goto LABEL_59;
}
}
}
if ( v64 != -99999 )
a1->m_easingType = v64;
if ( v65 != -99999.0 )
a1->m_easingRate = v65;
}
}
}
}
SetupTriggerPopup::updateEaseLabel(a1);
SetupTriggerPopup::updateEaseRateLabel(a1);
SetupTriggerPopup::toggleEaseRateVisibility(a1);
}