// // CharacterColorPage::init from 0xa257c0 to 0xa2623c (2684 bytes) // // 3 xrefs: // > CharacterColorPage::create @ 0xa26348 // > @ 0x87db0 // > @ 0x11d8d30 // // 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 CharacterColorPage::init(CharacterColorPage *a1) { cocos2d::CCDirector *v3; // x0 int v4; // w23 cocos2d::CCNode *v5; // x21 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x27 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v8; // x21 CCMenuItemSpriteExtra *v9; // x21 cocos2d::CCMenu *v10; // x21 float m_width; // s0 void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCArray *v13; // x0 cocos2d::CCArray *v14; // x0 GameManager *v15; // x0 cocos2d::CCNode *v16; // x21 cocos2d::CCNode_vtbl *v17; // x2 cocos2d::CCNode *v18; // x0 int v19; // w21 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2 GameManager *v21; // x0 IconType v22; // w27 int v23; // w25 SimplePlayer *v24; // x28 cocos2d::CCArray *v25; // x0 cocos2d::CCArray *v26; // x0 int v27; // w27 int v28; // w21 const char *v29; // x6 cocos2d::CCNode *v30; // x25 CCMenuItemSpriteExtra *v31; // x23 CCMenuItemSpriteExtra_vtbl *v32; // x1 float v33; // s0 float v34; // s2 float v35; // s1 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCPoint *p_m_textOffset; // x0 cocos2d::CCSprite *v38; // x21 cocos2d::CCSprite *v39; // x23 CCMenuItemToggler *v40; // x0 CCMenuItemToggler *v41; // x21 GameManager *v42; // x0 CCMenuItemToggler *m_glowToggler; // x21 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCLabelBMFont *v45; // x0 cocos2d::CCLabelBMFont *m_glowLabel; // x21 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCLabelBMFont *v48; // x21 void (__fastcall *v49)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 GameManager *v50; // x0 int v51; // w27 SimplePlayer *v52; // x21 CCMenuItemSpriteExtra *v53; // x25 void (__fastcall *v54)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x28 void (__fastcall *v55)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 void (__fastcall *v56)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 GameManager *v57; // x1 float v58; // s0 int random; // w25 int seed; // w1 float v61; // s0 float v62; // s1 GameManager *v63; // x1 GameManager *v64; // x0 GameManager *v65; // x0 GameManager *v66; // x0 GameManager *v67; // x0 unsigned int *p_m_caption; // x1 int m_data; // w2 __int64 v70; // [xsp+0h] [xbp+0h] BYREF float *v71; // [xsp+98h] [xbp+98h] char v72; // [xsp+A7h] [xbp+A7h] cocos2d::CCPoint *v73; // [xsp+A8h] [xbp+A8h] cocos2d::CCPoint *v74; // [xsp+B0h] [xbp+B0h] cocos2d::CCNode *m_buttonMenu; // [xsp+B8h] [xbp+B8h] float v76; // [xsp+C8h] [xbp+C8h] BYREF float v77; // [xsp+CCh] [xbp+CCh] cocos2d::CCPoint v78; // [xsp+D0h] [xbp+D0h] BYREF cocos2d::CCSize v79; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCPoint v80; // [xsp+E0h] [xbp+E0h] BYREF ButtonSprite *v81; // [xsp+E8h] [xbp+E8h] BYREF cocos2d::CCPoint v82; // [xsp+F0h] [xbp+F0h] BYREF cocos2d::CCRect v83; // [xsp+F8h] [xbp+F8h] BYREF cocos2d::CCPoint v84; // 0:kr08_8.8 cocos2d::CCPoint v85; // 0:kr10_8.8 cocos2d::CCPoint v86; // 0:kr18_8.8 cocos2d::SEL_MenuHandler v87; // 0:x2.16 cocos2d::SEL_MenuHandler v88; // 0:x2.16 cocos2d::SEL_MenuHandler v89; // 0:x2.16 cocos2d::SEL_MenuHandler v90; // 0:x3.16 cocos2d::CCRect v91; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v92; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v72 = FLAlertLayer::init(a1, 0x96u); if ( v72 ) { v3 = cocos2d::CCDirector::sharedDirector(); v71 = &v76; v74 = &v78; cocos2d::CCDirector::getWinSize(v3); v4 = 1; cocos2d::CCRect::CCRect(&v83, 0.0, 0.0, 80.0, 80.0); v5 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square05.png", (const char *)&v83, v91); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v5->__vftable[1].~CCNode_0)(v5, 0xFFFFFFFFLL); setContentSize = v5->setContentSize; a1->m_width = 450.0; a1->m_height = 300.0; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v83, 450.0, 300.0); setContentSize(v5, (const cocos2d::CCSize *)&v83); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v5, -1); setPosition = v5->setPosition; cocos2d::CCPoint::CCPoint(&v83.origin, v76 * 0.5, v77 * 0.5); setPosition(v5, &v83.origin); v8 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); v8->setScale(v8, 0.8); v87.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v87.adj = (size_t)CharacterColorPage::onClose; v9 = CCMenuItemSpriteExtra::create(v8, nullptr, v87); CCMenuItemSpriteExtra::setSizeMult(v9, 1.6); v10 = (cocos2d::CCMenu *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v9, nullptr); m_width = a1->m_width; a1->m_buttonMenu = v10; v12 = v10->setPosition; cocos2d::CCPoint::CCPoint( &v83.origin, 10.0 - (float)((float)(m_width * 0.5) - (float)(v76 * 0.5)), (float)((float)(a1->m_height * 0.5) + (float)(v77 * 0.5)) - 10.0); v12(v10, &v83.origin); v13 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, a1->m_buttonMenu, 10); v14 = (cocos2d::CCArray *)cocos2d::CCArray::create(v13); a1->m_playerObjects = v14; cocos2d::CCObject::retain(v14); cocos2d::CCPoint::CCPoint(&v78, v76 * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v77 * 0.5)) - 62.0); v15 = GameManager::sharedState(); LODWORD(m_buttonMenu) = v15->m_playerFrame.random - v15->m_playerFrame.seed; cocos2d::CCRect::CCRect(&v83, 0.0, 0.0, 80.0, 80.0); v16 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v83, v92); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v16->__vftable[1].~CCNode_0)(v16, 45); v73 = (cocos2d::CCPoint *)&v79; cocos2d::CCSize::CCSize(&v79, a1->m_width - 30.0, 60.0); v16->setContentSize(v16, &v79); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v16, 8); v16->setPosition(v16, &v78); v17 = v16->__vftable; v18 = v16; v19 = 0; getTag = v17[1].getTag; LOWORD(v83.origin.x) = 0; BYTE2(v83.origin.x) = 0; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v18, &v83); v73 = &stru_12441C8; cocos2d::CCPoint::CCPoint(&v80, &stru_12441C8); LABEL_4: v21 = GameManager::sharedState(); v22 = Cube; v23 = v21->m_playerFrame.random - v21->m_playerFrame.seed; LABEL_5: while ( 1 ) { v24 = SimplePlayer::create((int)m_buttonMenu); cocos2d::CCPoint::CCPoint(&v82, (float)((float)v19 * 52.0) + -182.0, 0.0); cocos2d::CCPoint::operator+(&v83, &v82, &v80); cocos2d::CCPoint::operator+(&v81, v74, &v83); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v24, 10); v24->setPosition(v24, (const cocos2d::CCPoint *)&v81); cocos2d::CCArray::addObject(a1->m_playerObjects, v24); v24->setScale(v24, 1.15); SimplePlayer::updatePlayerFrame(v24, v23, v22); if ( v4 == 8 ) break; ++v4; while ( 2 ) { v19 = v4 - 1; cocos2d::CCPoint::CCPoint(&v80, v73); switch ( v4 ) { case 2: v50 = GameManager::sharedState(); ++v4; v51 = v50->m_playerShip.random - v50->m_playerShip.seed; v52 = SimplePlayer::create((int)m_buttonMenu); cocos2d::CCPoint::CCPoint(&v82, -130.0, 0.0); cocos2d::CCPoint::operator+(&v83, &v82, &v80); cocos2d::CCPoint::operator+(&v81, v74, &v83); v89.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v89.adj = (size_t)CharacterColorPage::toggleShip; v53 = CCMenuItemSpriteExtra::create(v52, nullptr, v89); v53->setTag(v53, 1); v54 = v53->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v83, 30.0, 30.0); v54(v53, (const cocos2d::CCSize *)&v83); v55 = v52->setPosition; cocos2d::CCPoint::CCPoint(&v83.origin, 15.0, 15.0); v55(v52, &v83.origin); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v53); v56 = v53->setPosition; v86 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const cocos2d::CCPoint *)&v81); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v56)( v53, &v83, v86.x, v86.y); cocos2d::CCArray::addObject(a1->m_playerObjects, v52); v52->setScale(v52, 1.15); SimplePlayer::updatePlayerFrame(v52, v51, Ship); continue; case 3: v66 = GameManager::sharedState(); v22 = Ball; v23 = v66->m_playerBall.random - v66->m_playerBall.seed; goto LABEL_5; case 4: v65 = GameManager::sharedState(); v22 = Ufo; v23 = v65->m_playerBird.random - v65->m_playerBird.seed; goto LABEL_5; case 5: v64 = GameManager::sharedState(); v22 = Wave; v23 = v64->m_playerDart.random - v64->m_playerDart.seed; goto LABEL_5; case 6: v63 = GameManager::sharedState(); v58 = -6.0; v22 = Robot; random = v63->m_playerRobot.random; seed = v63->m_playerRobot.seed; goto LABEL_18; case 7: v57 = GameManager::sharedState(); v58 = -4.0; v22 = Spider; random = v57->m_playerSpider.random; seed = v57->m_playerSpider.seed; LABEL_18: v23 = random - seed; cocos2d::CCPoint::CCPoint(&v83.origin, v58, 0.0); cocos2d::CCPoint::operator=(&v80, v61, v62); break; case 8: v67 = GameManager::sharedState(); v22 = Swing; v23 = v67->m_playerSwing.random - v67->m_playerSwing.seed; break; default: goto LABEL_4; } break; } } v26 = (cocos2d::CCArray *)cocos2d::CCArray::create(v25); a1->m_modeButtons = v26; v27 = 0; v28 = 0; cocos2d::CCObject::retain(v26); do { sub_D153B8((unsigned int)&v70 + 232, &byte_F288A0); if ( v28 == 1 ) { sub_D1798C(&v81, "Col2", 4); } else if ( v28 == 2 ) { sub_D1798C(&v81, "Glow", 4); } else { sub_D1798C(&v81, "Col1", 4); } v30 = (cocos2d::CCNode *)ButtonSprite::create( v81, (const char *)&qword_28, 0, 0, 0.4, "bigFont.fnt", "GJ_button_01.png", v29, 20.0); v30->setScale(v30, 0.85); v88.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v88.adj = (size_t)CharacterColorPage::onMode; v31 = CCMenuItemSpriteExtra::create(v30, nullptr, v88); CCMenuItemSpriteExtra::setSizeMult(v31, 1.1); v31->setTag(v31, v28); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v31); v32 = v31->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v33 = a1->m_width * 0.5; v34 = *v71; v35 = a1->m_height * 0.5; m_buttonMenu = a1->m_buttonMenu; v36 = v32->setPosition; cocos2d::CCPoint::CCPoint( &v82, (float)((float)(v33 + (float)(v34 * 0.5)) - 137.0) + (float)v27, (float)(v35 + (float)(v71[1] * 0.5)) - 17.0); v84 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v82); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v36)(v31, &v83, v84.x, v84.y); cocos2d::CCArray::addObject(a1->m_modeButtons, v30); p_m_textOffset = &v81[-1].m_textOffset; if ( &v81[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_caption = (unsigned int *)&v81[-1].m_caption; do m_data = __ldaxr(p_m_caption); while ( __stlxr(m_data - 1, p_m_caption) ); } else { m_data = (int)v81[-1].m_caption.m_data.m_data; LODWORD(v81[-1].m_caption.m_data.m_data) = m_data - 1; } if ( m_data <= 0 ) operator delete(p_m_textOffset); } ++v28; v27 += 50; } while ( v28 != 3 ); CharacterColorPage::updateIconColors(a1); CharacterColorPage::createColorMenu(a1); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v81, 26.0 - (float)((float)(a1->m_width * 0.5) - (float)(v76 * 0.5)), 23.0 - (float)((float)(a1->m_height * 0.5) - (float)(v77 * 0.5))); v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); v38->setScale(v38, 0.6); v39->setScale(v39, 0.6); v90.adj = 0; v90.ptr = (void (__cdecl *)(cocos2d::CCObject *))CharacterColorPage::toggleGlow; v40 = CCMenuItemToggler::create(v38, v39, a1, v90); a1->m_glowToggler = v40; v41 = v40; v42 = GameManager::sharedState(); CCMenuItemToggler::toggle(v41, !v42->m_playerGlow); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_glowToggler); m_glowToggler = a1->m_glowToggler; v44 = m_glowToggler->setPosition; v85 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const cocos2d::CCPoint *)&v81); ((void (__fastcall *)(CCMenuItemToggler *, cocos2d::CCRect *, float, float))v44)(m_glowToggler, &v83, v85.x, v85.y); CCMenuItemToggler::setSizeMult(a1->m_glowToggler, 1.5); v45 = cocos2d::CCLabelBMFont::create(); a1->m_glowLabel = v45; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v45, 2); m_glowLabel = a1->m_glowLabel; setAnchorPoint = m_glowLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v83.origin, 0.0, 0.5); setAnchorPoint(m_glowLabel, &v83.origin); a1->m_glowLabel->setScale(a1->m_glowLabel, 0.45); v48 = a1->m_glowLabel; v49 = v48->setPosition; cocos2d::CCPoint::CCPoint(&v82, 18.0, 0.0); cocos2d::CCPoint::operator+(&v83, &v81, &v82); v49(v48, &v83.origin); CharacterColorPage::updateColorMode(a1, 0); } return v72; }
GD Web Decomp Icon

GD Web Decomp

Raw Source