// // CharacterColorPage::createColorMenu from 0x140088ea0 to 0x140089487 (1511 bytes) // // 2 xrefs: // > CharacterColorPage::init @ 0x140088a11 // > @ 0x1406c6cf0 // // 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 // // Hidden C++ exception states: #wind=3 void CharacterColorPage::createColorMenu(CharacterColorPage *a1) { cocos2d::CCDirector *v2; // rax __int64 v3; // rcx cocos2d::CCArray *v4; // rax __int64 v5; // rdi struct cocos2d::CCSprite *v6; // rbx cocos2d::CCDictionary *v7; // rax int i; // esi CharacterColorPage *v9; // rcx int v10; // eax __int64 v11; // r15 ColorChannelSprite *v12; // r13 const char *v13; // rcx struct cocos2d::CCSprite *v14; // rdi cocos2d::CCSprite_vtbl *v15; // rbx const cocos2d::CCPoint *v16; // rax CCMenuItemSpriteExtra *v17; // rdi float v18; // xmm1_4 float v19; // xmm2_4 CCMenuItemSpriteExtra_vtbl *v20; // rbx struct cocos2d::CCPoint v21; // rax cocos2d::ccColor3B *v22; // rcx cocos2d::CCRGBAProtocol_vtbl *v23; // rdi cocos2d::ccColor3B *v24; // rax void *v25; // rcx int v26; // [rsp+30h] [rbp-D0h] float v27; // [rsp+38h] [rbp-C8h] float v28; // [rsp+3Ch] [rbp-C4h] float v29[2]; // [rsp+40h] [rbp-C0h] BYREF char v30; // [rsp+48h] [rbp-B8h] BYREF cocos2d::CCPoint v31; // [rsp+4Ch] [rbp-B4h] BYREF cocos2d::CCPoint v32; // [rsp+58h] [rbp-A8h] BYREF char v33[8]; // [rsp+60h] [rbp-A0h] BYREF cocos2d::CCPoint v34; // [rsp+68h] [rbp-98h] BYREF CCMenuItemSpriteExtra *v35; // [rsp+70h] [rbp-90h] cocos2d::CCPoint v36; // [rsp+78h] [rbp-88h] BYREF struct cocos2d::CCPoint v37; // [rsp+80h] [rbp-80h] BYREF void *v38; // [rsp+88h] [rbp-78h] __int128 v39; // [rsp+90h] [rbp-70h] BYREF __int64 v40; // [rsp+A0h] [rbp-60h] unsigned __int64 v41; // [rsp+A8h] [rbp-58h] v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v2); cocos2d::CCPoint::CCPoint(&v32, v27 * 0.5, (float)(v28 * 0.5) - 59.0); v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3); a1->m_cursors = v4; cocos2d::CCObject::retain(v4); v5 = 3; do { v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v6->setScale_0)(v6); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v6, 11); cocos2d::CCArray::addObject(a1->m_cursors, v6); --v5; } while ( v5 ); v7 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(); a1->m_colorButtons = v7; cocos2d::CCObject::retain(v7); for ( i = 0; i < 144; ++i ) { v26 = (int)floorf((float)(i / 18)); v10 = CharacterColorPage::colorForIndex(v9, i); v11 = v10; if ( v10 < 0 ) continue; v12 = ColorChannelSprite::create(); cocos2d::CCDictionary::setObject(a1->m_colorButtons, v12, v11); ((void (__fastcall *)(ColorChannelSprite *))v12->setScale_0)(v12); v39 = 0; v40 = 0; v41 = 15; *(_QWORD *)&v39 = sub_14003AA10(0x20u); v40 = 19; v41 = 31; strcpy((char *)v39, "GJ_lockGray_001.png"); v13 = (const char *)&v39; if ( v41 > 0xF ) v13 = (const char *)v39; v14 = cocos2d::CCSprite::createWithSpriteFrameName(v13); ((void (__fastcall *)(struct cocos2d::CCSprite *))v14->setScale_0)(v14); v14->setTag(v14, 100); v12->addChild_1(v12, v14); v15 = v14->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v34, v12->m_obRect.size.width * 0.5, v12->m_obRect.size.height * 0.5); v15->setPosition_0(v14, v16); v35 = (CCMenuItemSpriteExtra *)operator new(0x208u); v17 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v35); if ( !v17 ) goto LABEL_11; if ( !CCMenuItemSpriteExtra::init( v17, v12, nullptr, a1, (cocos2d::SEL_MenuHandler *)CharacterColorPage::onPlayerColor) ) { ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v17->~CCMenuItemSpriteExtra)(v17, 1); LABEL_11: v17 = nullptr; goto LABEL_12; } cocos2d::CCObject::autorelease(v17); LABEL_12: v17->setTag(v17, v11); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v17); v18 = 0.0; if ( (unsigned int)(i - 54) > 0x51 ) v19 = 0.0; else v19 = -0.80000001; if ( i >= 136 ) v19 = 0.40000001; if ( (unsigned int)(i - 4) <= 0x8A ) { switch ( byte_1400893FC[i - 4] ) { case 0: v18 = 1.0; break; case 1: break; } } cocos2d::CCPoint::CCPoint(&v31, v18, v19); cocos2d::CCPoint::operator*(&v31, v29); cocos2d::CCPoint::CCPoint( &v36, (float)((float)((float)((float)(i % 18) * 24.0) - 204.0) + v29[0]) + 6.0, (float)(96.0 - (float)((float)v26 * 24.0)) + v29[1]); cocos2d::CCPoint::operator+(&v32, v33); v20 = v17->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v21 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v37); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v20->setPosition_0)(v17, v21); v22 = (cocos2d::ccColor3B *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v38 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(v38); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v22 = (cocos2d::ccColor3B *)qword_1406C2ED8; } v23 = v12->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable; v24 = GameManager::colorForIdx(v22, (GameManager *)&v30, v11); v23->setColor(&v12->cocos2d::CCRGBAProtocol, v24); if ( v41 > 0xF ) { v25 = (void *)v39; if ( v41 + 1 >= 0x1000 ) { v25 = *(void **)(v39 - 8); if ( (unsigned __int64)(v39 - (_QWORD)v25 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v25); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source