//
// SetupShaderEffectPopup::setupColorChange from 0xb398e0 to 0xb39ecc (1516 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0xb3abc8
// > ??> @ 0xf0f70
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:01:47 +0000
//
__int64 __fastcall SetupShaderEffectPopup::setupColorChange(cocos2d::CCArray **this)
{
cocos2d::CCDirector *v2; // x0
cocos2d::CCDirector *v3; // x0
const char *v4; // x1
__int64 v5; // x0
__int64 v6; // x21
cocos2d::CCNode *v7; // x23
float v8; // s1
float v9; // s4
void (__fastcall *v10)(__int64, __int64 *); // x22
__int64 v12; // [xsp+78h] [xbp+78h] BYREF
_BYTE v13[8]; // [xsp+80h] [xbp+80h] BYREF
_BYTE v14[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v15; // [xsp+90h] [xbp+90h] BYREF
cocos2d::CCDirector *v16[2]; // [xsp+98h] [xbp+98h] BYREF
void *v17; // [xsp+A8h] [xbp+A8h]
__int64 v18; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v19; // [xsp+B8h] [xbp+B8h]
void *v20; // [xsp+C0h] [xbp+C0h]
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "Setup Brightness Contrast", 0x19u);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v18);
if ( (v18 & 1) != 0 )
operator delete(v20);
v16[0] = nullptr;
v16[1] = nullptr;
v17 = nullptr;
std::string::__init((__int64 *)v16, "Help", 4u);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(
&v18,
"Edits colors on the screen.\n"
"CR, CG, and CB define how much red, green, and blue to tint with respectively.\n"
"BR, BG, and BB define the brightness of red, green, and blue.",
0xC0u);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v16, (char *)&v18, 1.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v2 = (cocos2d::CCDirector *)LOBYTE(v16[0]);
if ( ((__int64)v16[0] & 1) != 0 )
operator delete(v17);
v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize(&v12, v3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, *(float *)&v12 * 0.5, (float)(*((float *)&v12 + 1) * 0.5) + 90.0);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "FadeTime:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 10, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.7, 0.0, 0.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "CR:", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, -130.0, -50.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 176, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.6, -2.0, 2.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "CG:", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 0.0, -50.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 191, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.6, -2.0, 2.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "CB:", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 130.0, -50.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 175, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.6, -2.0, 2.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "BR:", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, -130.0, -100.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 179, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.6, -2.0, 2.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "BG:", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 0.0, -100.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 180, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.6, -2.0, 2.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "BB:", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 130.0, -100.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createValueControl(this, 189, (char *)&v18, (cocos2d::CCPoint *)&v15, 0.6, -2.0, 2.0);
if ( (v18 & 1) != 0 )
operator delete(v20);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, 0.0, -145.0);
cocos2d::CCPoint::operator+(&v15, v13);
SetupTriggerPopup::createEasingControls((__int64)this, (__int64)&v15, 0, 0, 0.7);
v5 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_resetBtn_001.png", v4);
v6 = CCMenuItemSpriteExtra::create(v5, 0, (__int64)this, (__int64)SetupShaderEffectPopup::onResetColors, 0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v6);
v7 = *(this + 69);
v8 = *((float *)this + 184);
v9 = *((float *)this + 183) * 0.5;
v10 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v6 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v14,
(float)(v9 + (float)(*(float *)&v12 * 0.5)) - 50.0,
(float)((float)(v8 * 0.5) + (float)(*((float *)&v12 + 1) * 0.5)) - 20.0);
cocos2d::CCNode::convertToNodeSpace(&v15, v7, (const cocos2d::CCPoint *)v14);
v10(v6, &v15);
return _stack_chk_guard;
}