//
// CharacterColorPage::init from 0x69d660 to 0x69ddba (1882 bytes)
//
// 1 xrefs:
// > CharacterColorPage::create @ 0x69cd06
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:56:20 +0000
//
GameManager *__fastcall CharacterColorPage::init(const cocos2d::CCPoint **this)
{
GameManager *v2; // r0
int v3; // r6
void (__fastcall *v4)(int, _DWORD *); // r8
void (__fastcall *v5)(int, _DWORD *); // r8
const char *v6; // r1
int v7; // r8
cocos2d::CCMenu *v8; // r8
const cocos2d::CCPoint *v9; // r0
float v10; // s12
float v11; // s14
float v12; // s15
const cocos2d::CCPoint *v13; // r8
void (__fastcall *v14)(const cocos2d::CCPoint *, _DWORD *); // r9
cocos2d::CCArray *v15; // r0
cocos2d::CCObject *v16; // r0
GameManager *v17; // r0
int v18; // r0
int v19; // r7
void (__fastcall *v20)(int, _DWORD *); // r3
GameManager *v21; // r0
int v22; // r0
int v23; // r1
int v24; // r7
int v25; // r5
int v26; // r0
int v27; // r0
int v28; // r0
int v29; // r0
int v30; // r0
int v31; // r0
int v32; // r0
cocos2d::CCObject *v33; // r8
int v34; // r11
cocos2d::CCArray *updated; // r0
cocos2d::CCObject *v36; // r0
int v37; // r11
char *v38; // r1
ButtonSprite *v39; // r0
cocos2d::CCObject *v40; // r7
int v41; // r6
const char *v42; // r1
int v43; // r8
const char *v44; // r1
int v45; // r7
cocos2d::CCNodeRGBA *v46; // r0
CCMenuItemToggler *v47; // r7
int v48; // r0
int v49; // r7
void (__fastcall *v50)(int, _BYTE *); // r8
const char *v51; // r2
const cocos2d::CCPoint *v52; // r0
int v53; // r7
void (__fastcall *v54)(int, _BYTE *); // r8
int v55; // r7
void (__fastcall *v56)(int, _BYTE *); // r10
float v58; // [sp+10h] [bp-9Ch]
int i; // [sp+14h] [bp-98h]
GameManager *v60; // [sp+18h] [bp-94h]
SimplePlayer *v61; // [sp+1Ch] [bp-90h]
SimplePlayer *v62; // [sp+1Ch] [bp-90h]
cocos2d::CCPoint *v63; // [sp+20h] [bp-8Ch]
void (__fastcall *v64)(int, _DWORD *); // [sp+28h] [bp-84h]
void (__fastcall *v65)(cocos2d::CCObject *, _DWORD *); // [sp+28h] [bp-84h]
void (__fastcall *v66)(int, _DWORD *); // [sp+28h] [bp-84h]
float v67; // [sp+40h] [bp-6Ch] BYREF
float v68; // [sp+44h] [bp-68h]
_BYTE v69[8]; // [sp+48h] [bp-64h] BYREF
_BYTE v70[8]; // [sp+50h] [bp-5Ch] BYREF
_BYTE v71[8]; // [sp+58h] [bp-54h] BYREF
_BYTE v72[8]; // [sp+60h] [bp-4Ch] BYREF
_BYTE v73[8]; // [sp+68h] [bp-44h] BYREF
int (__fastcall *v74)(CharacterColorPage *, cocos2d::CCObject *); // [sp+70h] [bp-3Ch]
int v75; // [sp+74h] [bp-38h]
int (__fastcall *v76)(CharacterColorPage *, cocos2d::CCObject *); // [sp+78h] [bp-34h]
int v77; // [sp+7Ch] [bp-30h]
_DWORD v78[2]; // [sp+80h] [bp-2Ch] BYREF
int v79[2]; // [sp+88h] [bp-24h] BYREF
ButtonSprite *v80; // [sp+90h] [bp-1Ch]
_DWORD v81[4]; // [sp+94h] [bp-18h] BYREF
v2 = FLAlertLayer::init((FLAlertLayer *)this, 150);
v60 = v2;
if ( v2 )
{
cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v67);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v81, 0.0, 0.0, 80.0, 80.0);
v3 = cocos2d::extension::CCScale9Sprite::create("GJ_square05.png", v81);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v3 + 456))(v3, 255);
*(this + 131) = (const cocos2d::CCPoint *)1133903872;
*(this + 132) = (const cocos2d::CCPoint *)1138819072;
v4 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v3 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v81, 450.0, 300.0);
v4(v3, v81);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v3, -1);
v5 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v3 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v67 * 0.5, v68 * 0.5);
v5(v3, v81);
v7 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v6);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 80))(v7, 1061997773);
v75 = 0;
v74 = CharacterColorPage::onClose;
v8 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v7, 0, (int)this, (int)CharacterColorPage::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v8, 1.6);
v9 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v8, nullptr);
v10 = v68;
v11 = (float)(v67 * 0.5) - (float)(*((float *)this + 132) * 0.5);
v12 = *((float *)this + 131);
*(this + 111) = v9;
v13 = v9;
v14 = *(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v9 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v81,
v11 + 10.0,
(float)((float)(v12 * 0.5) + (float)(v10 * 0.5)) - 10.0);
v14(v13, v81);
v15 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, _DWORD, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
*(this + 111),
10);
v16 = (cocos2d::CCObject *)cocos2d::CCArray::create(v15);
*(this + 133) = v16;
cocos2d::CCObject::retain(v16);
v17 = (GameManager *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v69,
v67 * 0.5,
(float)((float)(*((float *)this + 131) * 0.5) + (float)(v68 * 0.5)) - 62.0);
v18 = GameManager::sharedState(v17);
v61 = (SimplePlayer *)(*(_DWORD *)(v18 + 516) - *(_DWORD *)(v18 + 520));
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v81, 0.0, 0.0, 80.0, 80.0);
v19 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v81);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v19 + 456))(v19, 45);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v70, *((float *)this + 132) - 30.0, 60.0);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v19 + 160))(v19, v70);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v19, 8);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v19 + 92))(v19, v69);
v20 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v19 + 480);
LOWORD(v81[0]) = 0;
BYTE2(v81[0]) = 0;
v20(v19, v81);
for ( i = 0; i != 8; ++i )
{
v21 = (GameManager *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v72, (const cocos2d::CCPoint *)&unk_D2D550);
switch ( i )
{
case 1:
v26 = GameManager::sharedState(v21);
v24 = 1;
v25 = *(_DWORD *)(v26 + 528) - *(_DWORD *)(v26 + 532);
break;
case 2:
v27 = GameManager::sharedState(v21);
v24 = 2;
v25 = *(_DWORD *)(v27 + 540) - *(_DWORD *)(v27 + 544);
break;
case 3:
v28 = GameManager::sharedState(v21);
v24 = 3;
v25 = *(_DWORD *)(v28 + 552) - *(_DWORD *)(v28 + 556);
break;
case 4:
v29 = GameManager::sharedState(v21);
v24 = 4;
v25 = *(_DWORD *)(v29 + 564) - *(_DWORD *)(v29 + 568);
break;
case 5:
v30 = GameManager::sharedState(v21);
v25 = *(_DWORD *)(v30 + 576) - *(_DWORD *)(v30 + 580);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, -6.0, 0.0);
cocos2d::CCPoint::operator=(v72, v81);
v24 = 5;
break;
case 6:
v31 = GameManager::sharedState(v21);
v25 = *(_DWORD *)(v31 + 588) - *(_DWORD *)(v31 + 592);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, -4.0, 0.0);
cocos2d::CCPoint::operator=(v72, v81);
v24 = 6;
break;
case 7:
v32 = GameManager::sharedState(v21);
v24 = 7;
v25 = *(_DWORD *)(v32 + 600) - *(_DWORD *)(v32 + 604);
break;
default:
v22 = GameManager::sharedState(v21);
v24 = 0;
v25 = *(_DWORD *)(v22 + 516) - *(_DWORD *)(v22 + 520);
break;
}
v33 = SimplePlayer::create(v61, v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, (float)((float)i * 52.0) - 182.0, 0.0);
cocos2d::CCPoint::operator+(v81, v78, v72);
cocos2d::CCPoint::operator+(v73, v69, v81);
if ( v24 == 1 )
{
v77 = 0;
v76 = CharacterColorPage::toggleShip;
v34 = CCMenuItemSpriteExtra::create((int)v33, 0, (int)this, (int)CharacterColorPage::toggleShip, 0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v34 + 36))(v34, 1);
v64 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v34 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v81, 30.0, 30.0);
v64(v34, v81);
v65 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v33 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, 15.0, 15.0);
v65(v33, v81);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v34);
v66 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v34 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v81, *(this + 111));
v66(v34, v81);
}
else
{
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v33,
10);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v33 + 92))(v33, v73);
}
cocos2d::CCArray::addObject(*(this + 133), v33);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v33 + 80))(v33, 1066611507);
updated = (cocos2d::CCArray *)SimplePlayer::updatePlayerFrame((int)v33, v25, v24);
}
v36 = (cocos2d::CCObject *)cocos2d::CCArray::create(updated);
v37 = 0;
*(this + 134) = v36;
cocos2d::CCObject::retain(v36);
do
{
v79[0] = 0;
v79[1] = 0;
v80 = nullptr;
std::string::__init(v79, &unk_B6B226, 0);
if ( v37 == 1 )
{
v38 = "Col2";
}
else if ( v37 == 2 )
{
v38 = "Glow";
}
else
{
v38 = "Col1";
}
std::string::assign(v79, v38);
if ( (v79[0] & 1) != 0 )
v39 = v80;
else
v39 = (ButtonSprite *)((char *)v79 + 1);
v40 = ButtonSprite::create(
v39,
(const char *)&word_28,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41A00000,
v58);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v40 + 80))(v40, 1062836634);
v78[1] = 0;
v78[0] = CharacterColorPage::onMode;
v41 = CCMenuItemSpriteExtra::create((int)v40, 0, (int)this, (int)CharacterColorPage::onMode, 0);
CCMenuItemSpriteExtra::setSizeMult(v41, 1.1);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v41 + 36))(v41, v37);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v41);
v62 = *(SimplePlayer **)(*(_DWORD *)v41 + 92);
v63 = *(this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v73,
(float)((float)((float)(*((float *)this + 132) * 0.5) + (float)(v67 * 0.5)) - 137.0) + (float)(50 * v37),
(float)((float)(*((float *)this + 131) * 0.5) + (float)(v68 * 0.5)) - 17.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v81, v63);
((void (__fastcall *)(int, _DWORD *))v62)(v41, v81);
cocos2d::CCArray::addObject(*(this + 134), v40);
++v37;
std::string::~string((int)v79);
}
while ( v37 != 3 );
CharacterColorPage::updateIconColors(this);
CharacterColorPage::createColorMenu(this);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v71,
(float)((float)(v67 * 0.5) - (float)(*((float *)this + 132) * 0.5)) + 26.0,
(float)((float)(v68 * 0.5) - (float)(*((float *)this + 131) * 0.5)) + 23.0);
v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v42);
v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v44);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1058642330);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v45 + 80))(v45, 1058642330);
v81[1] = 0;
v81[0] = CharacterColorPage::toggleGlow;
v46 = CCMenuItemToggler::create(v43, v45, (int)this, (int)CharacterColorPage::toggleGlow, 0);
*(this + 138) = v46;
v47 = v46;
v48 = GameManager::sharedState(v46);
CCMenuItemToggler::toggle(v47, *(unsigned __int8 *)(v48 + 712) ^ 1);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), *(this + 138));
v49 = (int)*(this + 138);
v50 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v49 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v73, *(this + 111));
v50(v49, v73);
CCMenuItemToggler::setSizeMult(*(this + 138), 1.5);
v52 = (const cocos2d::CCPoint *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Glow", "bigFont.fnt", v51);
*(this + 139) = v52;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v52,
2);
v53 = (int)*(this + 139);
v54 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v53 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v73, 0.0, 0.5);
v54(v53, v73);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 139) + 80))(*(this + 139), 1055286886);
v55 = (int)*(this + 139);
v56 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v55 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v72, 18.0, 0.0);
cocos2d::CCPoint::operator+(v73, v71, v72);
v56(v55, v73);
CharacterColorPage::updateColorMode((CharacterColorPage *)this, 0);
}
return v60;
}