//
// CharacterColorPage::createColorMenu from 0x100153408 to 0x100153730 (808 bytes)
//
// 1 xrefs:
// > CharacterColorPage::init @ 0x100152e0c
//
// 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 10:59:40 +0000
//
void __fastcall CharacterColorPage::createColorMenu(__int64 a1)
{
__int64 v2; // x0
float *v3; // x0
__int64 v4; // x0
int v5; // w22
__int64 v6; // x21
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x20
__int64 v11; // x24
float *v12; // x23
void **v13; // x0
__int64 v14; // x25
__int64 v15; // x25
__int64 v16; // x0
__int64 v17; // x26
__n128 v18; // q0
__int64 v19; // x0
__int64 v20; // x0
__int64 v21; // x0
float32x2_t v22; // [xsp+8h] [xbp-C8h] BYREF
float32x2_t v23; // [xsp+10h] [xbp-C0h] BYREF
float32x2_t v24; // [xsp+18h] [xbp-B8h] BYREF
float32x2_t v25; // [xsp+20h] [xbp-B0h] BYREF
void *__p[2]; // [xsp+28h] [xbp-A8h] BYREF
char v27; // [xsp+3Fh] [xbp-91h]
float32x2_t v28; // [xsp+40h] [xbp-90h] BYREF
__int64 v29; // [xsp+48h] [xbp-88h] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(&v29, v2);
v3 = sub_1000262BC((float *)&v28, *(float *)&v29 * 0.5, (float)(*((float *)&v29 + 1) * 0.5) + -59.0);
v4 = sub_1002E736C(v3);
*(_QWORD *)(a1 + 696) = v4;
cocos2d::CCObject::retain(v4);
v5 = 3;
do
{
v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v6 + 160LL))(v6, 0.7);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v6, 11);
sub_1002E74E0(*(_QWORD *)(a1 + 696), v6);
--v5;
}
while ( v5 );
v8 = cocos2d::CCDictionary::create(v7);
*(_QWORD *)(a1 + 688) = v8;
v9 = cocos2d::CCObject::retain(v8);
v10 = 0;
do
{
v9 = CharacterColorPage::colorForIndex(v9, v10);
if ( (v9 & 0x80000000) == 0 )
{
v11 = v9;
v12 = (float *)ColorChannelSprite::create();
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 688), v12, (unsigned int)v11);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 160LL))(v12, 0.65);
sub_100009900(__p, "GJ_lockGray_001.png");
if ( v27 >= 0 )
v13 = __p;
else
v13 = (void **)__p[0];
v14 = cocos2d::CCSprite::createWithSpriteFrameName(v13);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v14 + 160LL))(v14, 0.8);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 72LL))(v14, 100);
(*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v12 + 456LL))(v12, v14);
sub_1000262BC((float *)&v25, v12[108] * 0.5, v12[109] * 0.5);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v14 + 184LL))(v14, &v25);
v15 = CCMenuItemSpriteExtra::create(v12, 0, a1, CharacterColorPage::onPlayerColor, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 72LL))(v15, v11);
v16 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v15);
CharacterColorPage::offsetForIndex(&v24, v16, v10);
sub_100026350(&v24, &v25, 12.0);
v17 = *(_QWORD *)(a1 + 552);
sub_1000262BC(
(float *)&v22,
(float)(v25.f32[0] + (float)(int)(24 * ((unsigned __int8)v10 % 0x12u) - 204)) + 6.0,
(float)((float)((float)((unsigned __int8)v10 / 0x12u) * -24.0) + 96.0) + v25.f32[1]);
v18.n128_u64[0] = (unsigned __int64)sub_100026318(&v28, &v22, &v23);
cocos2d::CCNode::convertToNodeSpace(&v24, v17, &v23, v18);
v19 = (*(__int64 (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v15 + 184LL))(v15, &v24);
v20 = GameManager::sharedState(v19);
v21 = GameManager::colorForIdx(v20, v11);
v24.i16[0] = v21;
v24.i8[2] = BYTE2(v21);
v9 = (*(__int64 (__fastcall **)(float *, float32x2_t *))(*(_QWORD *)v12 + 960LL))(v12, &v24);
if ( v27 < 0 )
operator delete(__p[0]);
}
v10 = (unsigned int)(v10 + 1);
}
while ( (_DWORD)v10 != 144 );
}