// // GJRequestCell::loadFromScore from 0x10024c220 to 0x10024c9dd (1981 bytes) // // 1 xrefs: // > CustomListView::loadCell @ 0x1002428d8 // // 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 GJRequestCell::loadFromScore(GJRequestCell *a1, GJUserScore *a2) { GJUserScore *m_score; // rdi SimplePlayer *v4; // r12 __int128 v5; // xmm0 GameManager *v6; // rax GameManager *v7; // rax GJUserScore *v8; // rax char m_glowEnabled; // cl int m_iconID; // esi int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d const cocos2d::CCPoint *v15; // rbx GJUserScore *v16; // rax std::string *p_m_userName; // rax char v18; // al __int64 v19; // r14 std::string *v20; // rdi GJUserScore *v21; // rax std::string *v22; // rax const char *v23; // rdi cocos2d::CCLabelBMFont *v24; // r13 __int64 v25; // r12 float v26; // xmm0_4 GJRequestCell *v27; // r14 CCMenuItemSpriteExtra *v28; // r12 ButtonSprite *v29; // r15 CCMenuItemSpriteExtra *v30; // r13 float *v31; // rax ButtonSprite *v32; // r12 cocos2d::CCLabelBMFont *m_label; // r15 __int64 v34; // r13 __int64 v35; // rsi GJRequestCell *v36; // r13 CCMenuItemSpriteExtra *v37; // r12 cocos2d::CCSprite *v38; // r14 cocos2d::CCSprite *v39; // r15 CCMenuItemToggler *v40; // rax CCMenuItemToggler *m_toggler; // r14 cocos2d::CCLabelBMFont *v42; // r14 cocos2d::CCLabelBMFont_vtbl *v43; // rax float *v44; // rax float v45; // xmm0_4 cocos2d::CCLabelBMFont *v46; // [rsp+0h] [rbp-90h] std::string __str; // [rsp+8h] [rbp-88h] BYREF GJRequestCell *v48; // [rsp+20h] [rbp-70h] _BYTE v49[8]; // [rsp+2Ch] [rbp-64h] BYREF char v50; // [rsp+34h] [rbp-5Ch] BYREF float m_width; // [rsp+3Ch] [rbp-54h] __int128 v52; // [rsp+40h] [rbp-50h] BYREF void *__p; // [rsp+50h] [rbp-40h] float v54; // [rsp+64h] [rbp-2Ch] double v55; // 0:xmm0_8.8 double v56; // 0:xmm0_8.8 double v57; // 0:xmm0_8.8 double v58; // 0:xmm0_8.8 ((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1); if ( !a2 ) return; cocos2d::CCObject::retain(a2); m_score = a1->m_score; if ( m_score ) { cocos2d::CCObject::release(m_score); a1->m_score = nullptr; } a1->m_score = a2; v54 = *(float *)&aFffO[4 * (a2->m_iconType == Ship)]; v4 = SimplePlayer::create(1); ((void (__fastcall *)(cocos2d::CCLayer *, SimplePlayer *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v4, 1); ((void (__fastcall *)(SimplePlayer *, float))v4->setScale)(v4, v54); *(_QWORD *)&v5 = 1114636288; sub_10028CBE0(&v52, 60.0, a1->m_height * 0.5); ((void (__fastcall *)(SimplePlayer *, __int128 *))v4->setPosition)(v4, &v52); v6 = GameManager::sharedState(); *(cocos2d::ccColor3B *)&v52 = GameManager::colorForIdx(v6, a1->m_score->m_color1); ((void (__fastcall *)(SimplePlayer *, __int128 *))v4->setColor)(v4, &v52); v7 = GameManager::sharedState(); *(cocos2d::ccColor3B *)&v52 = GameManager::colorForIdx(v7, a1->m_score->m_color2); SimplePlayer::setSecondColor(v4, (const cocos2d::ccColor3B *)&v52); SimplePlayer::tryEnableCustomGlowColor(v4, a1->m_score->m_color3); v8 = a1->m_score; m_glowEnabled = 1; if ( v8->m_special != 2 ) m_glowEnabled = v8->m_glowEnabled; v4->m_hasGlowOutline = m_glowEnabled; m_iconID = v8->m_iconID; SimplePlayer::updatePlayerFrame(v4, m_iconID, v8->m_iconType); SimplePlayer::updateColors(v4); v15 = (const cocos2d::CCPoint *)sub_100792C50(0, m_iconID, v11, v12, v13, v14); ((void (__fastcall *)(cocos2d::CCLayer *, const cocos2d::CCPoint *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v15); v16 = a1->m_score; if ( (v16->m_userName.m_data.m_short.sizex2 & 1) == 0 ) { p_m_userName = &v16->m_userName; __p = p_m_userName->m_data.m_long.longStorage; v5 = *(_OWORD *)&p_m_userName->m_data.m_short.sizex2; v52 = *(_OWORD *)&p_m_userName->m_data.m_short.sizex2; v18 = v52; if ( (v52 & 1) != 0 ) goto LABEL_8; LABEL_11: if ( v18 ) goto LABEL_14; goto LABEL_12; } sub_100006B70( &v52, v16->m_userName.m_data.m_long.longStorage, v16->m_userName.m_data.m_long.size, COERCE_DOUBLE(1114636288)); v18 = v52; if ( (v52 & 1) == 0 ) goto LABEL_11; LABEL_8: v19 = *((_QWORD *)&v52 + 1); operator delete(__p); if ( v19 ) goto LABEL_14; LABEL_12: v20 = (std::string *)&a1->m_score->m_userName; *(_WORD *)&__str.__r_.__value_.__l.0 = 11522; __str.__r_.__value_.__s.__data_[1] = 0; std::string::operator=(v20, &__str); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); LABEL_14: v21 = a1->m_score; if ( (v21->m_userName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70(&v52, v21->m_userName.m_data.m_long.longStorage, v21->m_userName.m_data.m_long.size, *(double *)&v5); if ( (v52 & 1) == 0 ) goto LABEL_16; LABEL_18: v23 = (const char *)__p; goto LABEL_19; } v22 = &v21->m_userName; __p = v22->m_data.m_long.longStorage; v52 = *(_OWORD *)&v22->m_data.m_short.sizex2; if ( (v52 & 1) != 0 ) goto LABEL_18; LABEL_16: v23 = (char *)&v52 + 1; LABEL_19: v24 = cocos2d::CCLabelBMFont::create_3(v23, "bigFont.fnt"); v48 = a1; if ( (v52 & 1) != 0 ) operator delete(__p); cocos2d::CCLabelBMFont::limitLabelWidth(v24, 120.0, 0.80000001, 0.0); v25 = ((__int64 (__fastcall *)(SimplePlayer *))v4->getPosition)(v4); m_width = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v24->getContentSize)(v24) * 0.5; v26 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v24->getScale)(v24); sub_10028CBE0(&v50, (float)(v26 * m_width) + 25.0, 0.0); sub_10028CCE0(&v52, v25); v46 = v24; v27 = v48; v28 = CCMenuItemSpriteExtra::create( v24, nullptr, v48, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJRequestCell::onViewProfile); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v15 + 440LL))(v15, v28); *(cocos2d::CCPoint *)&v55 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v50, v15); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v28->setPosition)(v28, &v50, v55); v29 = ButtonSprite::create_1("View", 50, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 25.0); v30 = CCMenuItemSpriteExtra::create( v29, nullptr, v27, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJRequestCell::onViewFriendRequest); CCMenuItemSpriteExtra::setSizeMult(v30, 1.5); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v15 + 440LL))(v15, v30); m_width = v27->m_width; v31 = (float *)((__int64 (__fastcall *)(ButtonSprite *))v29->getContentSize)(v29); sub_10028CBE0(v49, (float)((float)(*v31 * -0.5) + m_width) + -45.0, v27->m_height * 0.5); *(cocos2d::CCPoint *)&v56 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v50, v15); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v30->setPosition)(v30, &v50, v56); v32 = ButtonSprite::create_1("X", 50, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_06.png", 31.25); ((void (__fastcall *)(ButtonSprite *, float))v32->setScale)(v32, 0.80000001); m_label = v32->m_label; v34 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_label->getPosition)(m_label); sub_10028CBE0(v49, 1.5, -0.5); v35 = v34; v36 = v48; sub_10028CCE0(&v50, v35); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))m_label->setPosition)(m_label, &v50); v37 = CCMenuItemSpriteExtra::create( v32, nullptr, v36, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJRequestCell::onDeleteRequest); CCMenuItemSpriteExtra::setSizeMult(v37, 1.5); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v15 + 440LL))(v15, v37); sub_10028CBE0(v49, v36->m_width + -22.0, v36->m_height * 0.5); *(cocos2d::CCPoint *)&v57 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v50, v15); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v37->setPosition)(v37, &v50, v57); v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v38->setScale)(v38, 0.69999999); ((void (__fastcall *)(cocos2d::CCSprite *, float))v39->setScale)(v39, 0.69999999); v40 = CCMenuItemToggler::create(v39, v38, v36, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJRequestCell::onToggle); v36->m_toggler = v40; CCMenuItemToggler::toggle(v40, v36->m_score->m_toggled); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemToggler *))(*(_QWORD *)v15 + 440LL))(v15, v36->m_toggler); m_toggler = v36->m_toggler; sub_10028CBE0(v49, 20.0, v36->m_height * 0.5); *(cocos2d::CCPoint *)&v58 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v50, v15); ((void (__fastcall *)(CCMenuItemToggler *, char *, double))m_toggler->setPosition)(m_toggler, &v50, v58); CCMenuItemToggler::setSizeMult(v36->m_toggler, 1.2); if ( v36->m_score->m_newFriendRequest ) { v42 = cocos2d::CCLabelBMFont::create_3("!", "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v42->setColor)(v42, &unk_100818053); v43 = v42->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v54 = 0.5; ((void (__fastcall *)(cocos2d::CCLabelBMFont *))v43->setScale)(v42); sub_10028CBE0(&v50, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))v42->setAnchorPoint)(v42, &v50); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v36->m_mainLayer->addChild_0)( v36->m_mainLayer, v42, 10); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v42->setTag)(v42, 100); v44 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v46->getContentSize)(v46); v54 = v54 * *v44; v45 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v46->getScale)(v46); sub_10028CBE0(v49, (float)(v45 * v54) + 5.0, 0.0); sub_10028CCE0(&v50, &v52); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))v42->setPosition)(v42, &v50); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source