// // CharacterColorPage::createColorMenu from 0x10065db80 to 0x10065df39 (953 bytes) // // 1 xrefs: // > CharacterColorPage::init @ 0x10065d519 // // 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 __fastcall CharacterColorPage::createColorMenu(CharacterColorPage *a1) { cocos2d::CCDirector *v2; // rsi cocos2d::CCArray *v3; // rax cocos2d::CCSprite *v4; // rbx cocos2d::CCSprite *v5; // rbx cocos2d::CCSprite *v6; // rbx cocos2d::CCDictionary *v7; // rax CharacterColorPage *v8; // rdi unsigned int v9; // r15d int v10; // r13d int v11; // eax unsigned int v12; // ebx ColorChannelSprite *v13; // r12 cocos2d::CCDictionary *m_colorButtons; // rdi cocos2d::CCSprite *v15; // r14 CCMenuItemSpriteExtra *v16; // r14 const cocos2d::CCPoint *m_buttonMenu; // rbx GameManager *v18; // rax unsigned __int64 v19; // [rsp+8h] [rbp-88h] BYREF double v20; // [rsp+10h] [rbp-80h] BYREF unsigned __int64 v21; // [rsp+18h] [rbp-78h] BYREF void *v22[3]; // [rsp+20h] [rbp-70h] BYREF float v23[2]; // [rsp+3Ch] [rbp-54h] BYREF double v24; // [rsp+44h] [rbp-4Ch] BYREF int v25; // [rsp+4Ch] [rbp-44h] CharacterColorPage *v26; // [rsp+50h] [rbp-40h] unsigned __int64 v27; // [rsp+5Ch] [rbp-34h] BYREF unsigned int v28; // [rsp+64h] [rbp-2Ch] double v29; // 0:xmm0_8.8 v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v23); sub_10028CBE0((float *)&v19, v23[0] * 0.5, (float)(v23[1] * 0.5) + -59.0); v3 = (cocos2d::CCArray *)sub_10071F9E0(&v19, v2); a1->m_cursors = v3; cocos2d::CCObject::retain(v3); v4 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v4->setScale)(v4, 0.69999999); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v4, 11); sub_10071FCD0(a1->m_cursors, v4); v5 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v5->setScale)(v5, 0.69999999); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v5, 11); sub_10071FCD0(a1->m_cursors, v5); v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScale)(v6, 0.69999999); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v6, 11); sub_10071FCD0(a1->m_cursors, v6); v7 = cocos2d::CCDictionary::create(); v26 = a1; a1->m_colorButtons = v7; v8 = (CharacterColorPage *)v7; cocos2d::CCObject::retain(v7); v9 = 0; v10 = -204; do { v11 = CharacterColorPage::colorForIndex(v8, v9); if ( v11 >= 0 ) { v12 = v11; v13 = ColorChannelSprite::create(); m_colorButtons = v26->m_colorButtons; v28 = v12; cocos2d::CCDictionary::setObject(m_colorButtons, v13, v12); ((void (__fastcall *)(ColorChannelSprite *, float))v13->setScale)(v13, 0.64999998); strcpy((char *)v22, "&GJ_lockGray_001.png"); v15 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v22 + 1); ((void (__fastcall *)(cocos2d::CCSprite *, float))v15->setScale)(v15, 0.80000001); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v15->setTag)(v15, 100); ((void (__fastcall *)(ColorChannelSprite *, cocos2d::CCSprite *))v13->addChild)(v13, v15); sub_10028CBE0((float *)&v24, v13->m_obRect.size.width * 0.5, v13->m_obRect.size.height * 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, double *))v15->setPosition)(v15, &v24); v16 = CCMenuItemSpriteExtra::create( v13, nullptr, v26, (cocos2d::SEL_MenuHandler)(unsigned __int64)CharacterColorPage::onPlayerColor); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v16->setTag)(v16, v28); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v26->m_buttonMenu->addChild)( v26->m_buttonMenu, v16); CharacterColorPage::offsetForIndex((CharacterColorPage *)&v27, (int)v16); sub_10028CD40(&v24, &v27, (__m128)0x41400000u); v25 = v10; m_buttonMenu = (const cocos2d::CCPoint *)v26->m_buttonMenu; sub_10028CBE0( (float *)&v21, (float)((float)(int)(v10 - 432 * (v9 / 0x12)) + *(float *)&v24) + 6.0, (float)((float)((float)((unsigned __int8)v9 / 0x12u) * -24.0) + 96.0) + *((float *)&v24 + 1)); sub_10028CCE0(&v20, &v19, &v21); *(cocos2d::CCPoint *)&v29 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v27, m_buttonMenu); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v16->setPosition)(v16, &v27, v29); v18 = GameManager::sharedState(); *(cocos2d::ccColor3B *)&v27 = GameManager::colorForIdx(v18, v28); v8 = (CharacterColorPage *)v13; ((void (__fastcall *)(ColorChannelSprite *, unsigned __int64 *))v13->setColor)(v13, &v27); if ( ((__int64)v22[0] & 1) != 0 ) { v8 = (CharacterColorPage *)v22[2]; operator delete(v22[2]); } v10 = v25; } ++v9; v10 += 24; } while ( v9 != 144 ); }