//
// SetupGradientPopup::init from 0x1005f1820 to 0x1005f2acc (4780 bytes)
//
// 1 xrefs:
// > SetupGradientPopup::create @ 0x1005f17d5
//
// 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 __fastcall SetupGradientPopup::init(SetupGradientPopup *a1, GradientTriggerObject *a2, cocos2d::CCArray *a3)
{
SetupGradientPopup *v3; // r14
bool result; // al
ButtonSprite *v5; // rax
CCMenuItemSpriteExtra *v6; // rax
cocos2d::CCObject *v7; // rax
cocos2d::CCLabelBMFont *v8; // rbx
cocos2d::CCLabelBMFont *v9; // rbx
cocos2d::CCLabelBMFont *v10; // rbx
cocos2d::CCLabelBMFont *v11; // rbx
__int64 v12; // r14
__int64 v13; // rax
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rax
unsigned int v17; // ebx
cocos2d::CCLabelBMFont *v18; // rbx
__int64 v19; // r13
cocos2d::CCLabelBMFont *v20; // rax
__int64 v21; // r14
unsigned __int64 *v22; // rbx
int v23; // eax
const char *v24; // rsi
cocos2d::CCSprite *v25; // r12
unsigned int v26; // r14d
CCMenuItemSpriteExtra *v27; // r12
unsigned __int64 *v28; // rbx
cocos2d::CCSprite *v29; // rbx
CCMenuItemSpriteExtra *v30; // rbx
unsigned __int64 *v31; // r12
cocos2d::CCObject *v32; // rax
cocos2d::CCObject *v33; // rdi
cocos2d::CCArray *v34; // r13
__int64 v35; // r12
CCMenuItemSpriteExtra *v36; // r15
cocos2d::CCPoint *v37; // rdi
const char *v38; // rdi
ButtonSprite *v39; // rbx
__int64 v40; // r14
unsigned int v41; // ebx
__int64 v42; // r12
ButtonSprite *v43; // r14
const char *v44; // rsi
const cocos2d::CCPoint *v45; // r12
cocos2d::CCPoint v46; // xmm1_8
const cocos2d::CCPoint *v47; // rbx
std::string v48; // [rsp+40h] [rbp-1C0h] BYREF
__int16 v49; // [rsp+58h] [rbp-1A8h] BYREF
char v50; // [rsp+5Ah] [rbp-1A6h]
void *v51; // [rsp+68h] [rbp-198h]
__int16 v52; // [rsp+70h] [rbp-190h] BYREF
char v53; // [rsp+72h] [rbp-18Eh]
void *v54; // [rsp+80h] [rbp-180h]
__int16 v55; // [rsp+88h] [rbp-178h] BYREF
char v56; // [rsp+8Ah] [rbp-176h]
void *v57; // [rsp+98h] [rbp-168h]
__int16 v58; // [rsp+A0h] [rbp-160h] BYREF
char v59; // [rsp+A2h] [rbp-15Eh]
void *v60; // [rsp+B0h] [rbp-150h]
char v61; // [rsp+B8h] [rbp-148h] BYREF
char v62[15]; // [rsp+B9h] [rbp-147h] BYREF
void *v63; // [rsp+C8h] [rbp-138h]
__int128 v64; // [rsp+D0h] [rbp-130h] BYREF
void *v65; // [rsp+E0h] [rbp-120h]
char v66; // [rsp+E8h] [rbp-118h] BYREF
char v67[15]; // [rsp+E9h] [rbp-117h] BYREF
void *v68; // [rsp+F8h] [rbp-108h]
_BYTE v69[24]; // [rsp+100h] [rbp-100h] BYREF
__int128 v70; // [rsp+118h] [rbp-E8h] BYREF
void *v71; // [rsp+128h] [rbp-D8h]
__int128 v72; // [rsp+130h] [rbp-D0h] BYREF
void *v73; // [rsp+140h] [rbp-C0h]
__int128 v74; // [rsp+148h] [rbp-B8h] BYREF
void *v75; // [rsp+158h] [rbp-A8h]
char v76; // [rsp+160h] [rbp-A0h] BYREF
_BYTE v77[23]; // [rsp+161h] [rbp-9Fh] BYREF
unsigned __int64 v78; // [rsp+178h] [rbp-88h] BYREF
unsigned __int64 v79; // [rsp+180h] [rbp-80h] BYREF
cocos2d::CCPoint *v80; // [rsp+188h] [rbp-78h]
unsigned __int64 v81; // [rsp+190h] [rbp-70h] BYREF
unsigned __int64 v82; // [rsp+198h] [rbp-68h] BYREF
unsigned __int64 v83; // [rsp+1A0h] [rbp-60h] BYREF
double v84[2]; // [rsp+1A8h] [rbp-58h] BYREF
void *v85; // [rsp+1B8h] [rbp-48h]
SetupGradientPopup *v86; // [rsp+1C0h] [rbp-40h]
float v87; // [rsp+1CCh] [rbp-34h] BYREF
float v88; // [rsp+1D0h] [rbp-30h]
bool v89; // [rsp+1D7h] [rbp-29h]
double v90; // 0:xmm0_8.8
double v91; // 0:xmm0_8.8
v3 = a1;
result = SetupTriggerPopup::init(a1, a2, a3, 420.0, 290.0, 1);
if ( !result )
return result;
v89 = result;
((void (__fastcall *)(SetupGradientPopup *))a1->determineStartValues)(a1);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v87);
strcpy(v69, "*Setup Gradient Effect");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)v69);
if ( (v69[0] & 1) != 0 )
operator delete(*(void **)&v69[16]);
v61 = 8;
strcpy(v62, "Help");
v65 = operator new(0x168u);
*(_QWORD *)&v64 = 361;
*((_QWORD *)&v64 + 1) = 354;
strcpy(
(char *)v65,
"Creates a gradient with set colors in a given area.\n"
"U, D, L, and R must be set to a group at each side of the area.\n"
"Use Vertex Mode to set corners of the area instead.\n"
"Blending changes the gradient method.\n"
"Use ID to give a gradient a unique identifier that can be used to disable it with another of these triggers.");
SetupTriggerPopup::addHelpButton((__int64)a1, (__int64)&v61, &v64, (__m128)0x3F800000u);
if ( (v64 & 1) != 0 )
operator delete(v65);
if ( (v61 & 1) != 0 )
operator delete(v63);
v5 = ButtonSprite::create_1("OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0);
v6 = CCMenuItemSpriteExtra::create(v5, nullptr, a1, (cocos2d::SEL_MenuHandler)0x529uLL);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v6);
sub_10028CBE0((float *)&v81, (float)(v87 * 0.5) + -20.0, (float)(0.5 * v88) + 90.0);
v49 = 8194;
v50 = 0;
sub_10028CBE0((float *)&v83, -135.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
203,
(__int64)&v49,
(float *)v84,
1,
Int,
0.69999999,
0.0,
0.0,
5,
0,
0,
0,
0,
2,
0);
if ( (v49 & 1) != 0 )
operator delete(v51);
v52 = 8194;
v53 = 0;
sub_10028CBE0((float *)&v83, -45.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
204,
(__int64)&v52,
(float *)v84,
1,
Int,
0.69999999,
0.0,
0.0,
5,
0,
0,
0,
0,
2,
0);
if ( (v52 & 1) != 0 )
operator delete(v54);
v55 = 8194;
v56 = 0;
sub_10028CBE0((float *)&v83, 45.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
205,
(__int64)&v55,
(float *)v84,
1,
Int,
0.69999999,
0.0,
0.0,
5,
0,
0,
0,
0,
2,
0);
if ( (v55 & 1) != 0 )
operator delete(v57);
v58 = 8194;
v59 = 0;
sub_10028CBE0((float *)&v83, 135.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
206,
(__int64)&v58,
(float *)v84,
1,
Int,
0.69999999,
0.0,
0.0,
5,
0,
0,
0,
0,
2,
0);
if ( (v58 & 1) != 0 )
{
a1 = (SetupGradientPopup *)v60;
operator delete(v60);
}
v7 = (cocos2d::CCObject *)sub_10071F9E0(a1, 206);
v3->m_gradientLabels = (cocos2d::CCArray *)v7;
cocos2d::CCObject::retain(v7);
v8 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt");
v86 = v3;
sub_10028CBE0((float *)v84, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v8->setAnchorPoint)(v8, v84);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v86->m_mainLayer->addChild)(v86->m_mainLayer, v8);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v8->setScale)(v8, 0.5);
sub_10028CBE0((float *)&v83, -135.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v8->setPosition)(v8, v84);
sub_10071FCD0(v86->m_gradientLabels, v8);
v9 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt");
sub_10028CBE0((float *)v84, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v9->setAnchorPoint)(v9, v84);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v86->m_mainLayer->addChild)(v86->m_mainLayer, v9);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v9->setScale)(v9, 0.5);
sub_10028CBE0((float *)&v83, -45.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v9->setPosition)(v9, v84);
sub_10071FCD0(v86->m_gradientLabels, v9);
v10 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt");
sub_10028CBE0((float *)v84, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v10->setAnchorPoint)(v10, v84);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v86->m_mainLayer->addChild)(v86->m_mainLayer, v10);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v10->setScale)(v10, 0.5);
sub_10028CBE0((float *)&v83, 45.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v10->setPosition)(v10, v84);
sub_10071FCD0(v86->m_gradientLabels, v10);
v11 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt");
sub_10028CBE0((float *)v84, 1.0, 0.5);
v12 = (__int64)v86;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v11->setAnchorPoint)(v11, v84);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(v12 + 576) + 440LL))(
*(_QWORD *)(v12 + 576),
v11);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v11->setScale)(v11, 0.5);
sub_10028CBE0((float *)&v83, 135.0, 0.0);
sub_10028CCE0(v84, &v81, &v83);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v11->setPosition)(v11, v84);
sub_10071FCD0(*(_QWORD *)(v12 + 976), v11);
if ( (unsigned int)sub_100720070(*(_QWORD *)(v12 + 976)) )
{
v13 = sub_1007200C0(*(_QWORD *)(v12 + 976), 0);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v13 + 912LL))(v13, "U:");
if ( (unsigned int)sub_100720070(*(_QWORD *)(v12 + 976)) >= 2 )
{
v14 = sub_1007200C0(*(_QWORD *)(v12 + 976), 1);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v14 + 912LL))(v14, "D:");
if ( (unsigned int)sub_100720070(*(_QWORD *)(v12 + 976)) >= 3 )
{
v15 = sub_1007200C0(*(_QWORD *)(v12 + 976), 2);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v15 + 912LL))(v15, "L:");
if ( (unsigned int)sub_100720070(*(_QWORD *)(v12 + 976)) >= 4 )
{
v16 = sub_1007200C0(*(_QWORD *)(v12 + 976), 3);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v16 + 912LL))(v16, "R:");
if ( (unsigned int)sub_100720070(*(_QWORD *)(v12 + 976)) >= 5 )
{
v17 = 4;
do
sub_1007200C0(*(_QWORD *)(v12 + 976), v17++);
while ( v17 < (unsigned int)sub_100720070(*(_QWORD *)(v12 + 976)) );
}
}
}
}
}
LOBYTE(v70) = 22;
strcpy((char *)&v70 + 1, "Vertex\nMode");
sub_10028CBE0(
(float *)v84,
(float)((float)(*(float *)(v12 + 708) * 0.5) + (float)(v87 * 0.5)) + -72.0,
(float)((float)(*(float *)(v12 + 712) * 0.5) + (float)(v88 * 0.5)) + -20.0);
SetupTriggerPopup::createToggleValueControl(v12, 207, &v70, 1.0, (__int64)v84, 0, 0, 0);
if ( (v70 & 1) != 0 )
operator delete(v71);
sub_10028CBE0((float *)&v83, (float)(v87 * 0.5) + 145.0, (float)(v88 * 0.5) + 40.0);
LOBYTE(v72) = 14;
strcpy((char *)&v72 + 1, "Disable");
sub_10028CC60(v84, (double *)&v83);
SetupTriggerPopup::createToggleValueControl(v12, 208, &v72, 0.80000001, (__int64)v84, 0, 0, 0);
if ( (v72 & 1) != 0 )
operator delete(v73);
LOBYTE(v74) = 22;
strcpy((char *)&v74 + 1, "Disable\nAll");
sub_10028CBE0((float *)&v79, 0.0, -25.0);
sub_10028CCE0(v84, &v83, &v79);
SetupTriggerPopup::createToggleValueControl(v12, 508, &v74, 0.80000001, (__int64)v84, 0, 0, 0);
if ( (v74 & 1) != 0 )
operator delete(v75);
v76 = 30;
strcpy(v77, "Preview\nOpacity");
sub_10028CBE0(
(float *)v84,
(float)((float)(*(float *)(v12 + 708) * 0.5) + (float)(v87 * 0.5)) + -72.0,
(float)((float)(v88 * 0.5) - (float)(*(float *)(v12 + 712) * 0.5)) + 40.0);
SetupTriggerPopup::createValueControlAdvanced(
v12,
456,
(__int64)&v76,
(float *)v84,
0,
Float,
0.64999998,
0.0,
0.0,
5,
0,
0,
0,
0,
2,
0);
if ( (v76 & 1) != 0 )
operator delete(*(void **)&v77[15]);
sub_10028CBE0((float *)&v79, (float)(v87 * 0.5) + -20.0, (float)(0.5 * v88) + 60.0);
v66 = 4;
strcpy(v67, "ID");
sub_10028CBE0((float *)&v82, 75.0, -25.0);
sub_10028CCE0(v84, &v79, &v82);
SetupTriggerPopup::createValueControlAdvanced(
v12,
209,
(__int64)&v66,
(float *)v84,
1,
Int,
0.69999999,
0.0,
0.0,
3,
1,
0,
0,
0,
2,
0);
if ( (v66 & 1) != 0 )
operator delete(v68);
sub_10028CBE0((float *)&v82, 95.0, 0.0);
sub_10028CCE0(v84, &v79, &v82);
*(_WORD *)&v48.__r_.__value_.__l.0 = 0;
SetupTriggerPopup::createPlusButton((__int64)v86, 209, (__int64)v84, &v48, 0, 0, 0.80000001);
if ( (*(_BYTE *)&v48.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v48.__r_.__value_.__l.__data_);
v18 = cocos2d::CCLabelBMFont::create_3("Blending", "goldFont.fnt");
sub_10028CBE0((float *)&v82, -85.0, 0.0);
sub_10028CCE0(v84, &v79, &v82);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v18->setPosition)(v18, v84);
v19 = (__int64)v86;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v86->m_mainLayer->addChild)(v86->m_mainLayer, v18);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v18->setScale)(v18, 0.60000002);
v20 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt");
*(_QWORD *)(v19 + 944) = v20;
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(**(_QWORD **)(v19 + 576) + 440LL))(
*(_QWORD *)(v19 + 576),
v20);
v21 = *(_QWORD *)(v19 + 944);
v22 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v18->getPosition)(v18);
sub_10028CBE0((float *)&v82, 0.0, -25.0);
sub_10028CCE0(v84, v22, &v82);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v21 + 184LL))(v21, v84);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(v19 + 944) + 160LL))(*(_QWORD *)(v19 + 944), 0.5);
v23 = *(_DWORD *)(v19 + 952);
if ( v23 > 1 )
{
if ( v23 != 2 )
{
if ( v23 == 3 )
{
v24 = "Invert";
goto LABEL_45;
}
goto LABEL_42;
}
v24 = "Multiply";
}
else
{
if ( v23 != -99999 )
{
if ( v23 == 1 )
{
v24 = "Additive";
goto LABEL_45;
}
LABEL_42:
v24 = "Normal";
goto LABEL_45;
}
v24 = "Mixed";
}
LABEL_45:
(*(void (__fastcall **)(_QWORD, const char *))(**(_QWORD **)(v19 + 944) + 912LL))(*(_QWORD *)(v19 + 944), v24);
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(v19 + 944), 150.0, 0.69999999, 0.0);
v25 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v26 = 1;
cocos2d::CCSprite::setFlipX(v25, 1);
((void (__fastcall *)(cocos2d::CCSprite *, float))v25->setScale)(v25, 0.60000002);
v27 = CCMenuItemSpriteExtra::create(
v25,
nullptr,
(cocos2d::CCObject *)v19,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SetupGradientPopup::onBlending);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(v19 + 544) + 440LL))(
*(_QWORD *)(v19 + 544),
v27);
v80 = *(cocos2d::CCPoint **)(v19 + 544);
v28 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v19 + 944) + 192LL))(*(_QWORD *)(v19 + 944));
sub_10028CBE0((float *)&v78, 75.0, 0.0);
sub_10028CCE0((double *)&v82, v28, &v78);
*(cocos2d::CCPoint *)&v90 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v84, v80);
((void (__fastcall *)(CCMenuItemSpriteExtra *, double *, double))v27->setPosition)(v27, v84, v90);
CCMenuItemSpriteExtra::setSizeMult(v27, 1.4);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v27->setTag)(v27, 1);
v29 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v29->setScale)(v29, 0.60000002);
v30 = CCMenuItemSpriteExtra::create(
v29,
nullptr,
(cocos2d::CCObject *)v19,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SetupGradientPopup::onBlending);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(v19 + 544) + 440LL))(
*(_QWORD *)(v19 + 544),
v30);
v80 = *(cocos2d::CCPoint **)(v19 + 544);
v31 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v19 + 944) + 192LL))(*(_QWORD *)(v19 + 944));
sub_10028CBE0((float *)&v78, -75.0, 0.0);
sub_10028CCE0((double *)&v82, v31, &v78);
*(cocos2d::CCPoint *)&v91 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v84, v80);
((void (__fastcall *)(CCMenuItemSpriteExtra *, double *, double))v30->setPosition)(v30, v84, v91);
CCMenuItemSpriteExtra::setSizeMult(v30, 1.4);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v30->setTag)(v30, 0);
SetupTriggerPopup::createMultiTriggerItemsCorner((SetupTriggerPopup *)v19);
v32 = (cocos2d::CCObject *)sub_10071F9E0(v19, 0);
*(_QWORD *)(v19 + 960) = v32;
v33 = v32;
cocos2d::CCObject::retain(v32);
v34 = (cocos2d::CCArray *)sub_10071F9E0(v33, 0);
v80 = (cocos2d::CCPoint *)sub_10071F9E0(v33, 0);
v35 = (__int64)v86;
do
{
SetupShaderEffectPopup::zLayerToString((__int64)v84, v26);
v38 = (char *)v84 + 1;
if ( (LOBYTE(v84[0]) & 1) != 0 )
v38 = (const char *)v85;
v39 = ButtonSprite::create_1(v38, 220, 0, 0.30000001, 0, "bigFont.fnt", "GJ_button_04.png", 25.0);
if ( (LOBYTE(v84[0]) & 1) != 0 )
operator delete(v85);
sub_10071FCD0(*(_QWORD *)(v35 + 960), v39);
v36 = CCMenuItemSpriteExtra::create(
v39,
nullptr,
(cocos2d::CCObject *)v35,
(cocos2d::SEL_MenuHandler)(unsigned __int64)SetupGradientPopup::onZLayer);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v36->setTag)(v36, v26);
((void (__fastcall *)(ButtonSprite *, _QWORD))v39->setTag)(v39, v26);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(v35 + 544) + 440LL))(
*(_QWORD *)(v35 + 544),
v36);
v37 = (cocos2d::CCPoint *)v34;
if ( v26 >= 8 )
v37 = v80;
sub_10071FCD0(v37, v36);
++v26;
}
while ( v26 != 16 );
v40 = (__int64)v86;
if ( (unsigned int)sub_100720070(v86->m_layerButtons) )
{
v41 = 0;
do
{
v42 = v40;
v43 = (ButtonSprite *)sub_1007200C0(*(_QWORD *)(v40 + 960), v41);
v44 = "GJ_button_02.png";
if ( ((unsigned int (__fastcall *)(ButtonSprite *))v43->getTag)(v43) != *(_DWORD *)(v42 + 968) )
v44 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v43, v44);
++v41;
v40 = (__int64)v86;
}
while ( v41 < (unsigned int)sub_100720070(v86->m_layerButtons) );
}
v45 = *(const cocos2d::CCPoint **)(v40 + 544);
v46 = (cocos2d::CCPoint)LODWORD(v88);
v46.x = (float)(v88 * 0.5) + -10.0;
sub_10028CBE0((float *)&v82, (float)(v87 * 0.5) + -20.0, v46.x);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v84, v45);
GameToolbox::alignItemsHorisontally(v34, 8.0, v46, (bool)v84);
v47 = *(const cocos2d::CCPoint **)(v40 + 544);
v46.y = 0.0;
v46.x = (float)(0.5 * v88) + -50.0;
sub_10028CBE0((float *)&v82, (float)(v87 * 0.5) + -20.0, v46.x);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v84, v47);
GameToolbox::alignItemsHorisontally((cocos2d::CCArray *)v80, 8.0, v46, (bool)v84);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v40 + 1400LL))(v40);
*(_BYTE *)(v40 + 716) = 0;
return v89;
}