// // GJRequestCell::loadFromScore from 0x10010a0cc to 0x10010a800 (1844 bytes) // // 1 xrefs: // > CustomListView::loadCell @ 0x100101298 // // 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; // x0 float v5; // s8 char m_glowEnabled; // w20 SimplePlayer *v7; // x22 __n128 v8; // q0 __n128 v9; // q1 GameManager *v10; // x0 GameManager *v11; // x0 GJUserScore *v12; // x8 cocos2d::CCNode *v13; // x20 GJUserScore *v14; // x8 void *v15; // x21 GJUserScore *v16; // x21 GJUserScore *v17; // x8 void **v18; // x0 cocos2d::CCLabelBMFont *v19; // x21 float32x2_t *v20; // x22 float v21; // s9 __n128 v22; // q0 __n128 v23; // q1 CCMenuItemSpriteExtra *v24; // x22 ButtonSprite *v25; // x23 CCMenuItemSpriteExtra *v26; // x24 float m_width; // s11 __n128 v28; // q0 __n128 v29; // q1 ButtonSprite *v30; // x22 cocos2d::CCLabelBMFont *m_label; // x23 float32x2_t *v32; // x24 __n128 v33; // q0 __n128 v34; // q1 double v35; // d0 CCMenuItemSpriteExtra *v36; // x22 __n128 v37; // q0 __n128 v38; // q1 cocos2d::CCSprite *v39; // x22 cocos2d::CCSprite *v40; // x23 CCMenuItemToggler *v41; // x0 __n128 v42; // q0 CCMenuItemToggler *m_toggler; // x22 __n128 v44; // q1 cocos2d::CCLabelBMFont *v45; // x20 __n128 v46; // q0 __n128 v47; // q1 float v48; // s8 __n128 v49; // q0 __n128 v50; // q1 double v51; // d0 float32x2_t v52; // [xsp+8h] [xbp-98h] BYREF float32x2_t v53; // [xsp+10h] [xbp-90h] BYREF std::string __str; // [xsp+18h] [xbp-88h] BYREF void *__p[2]; // [xsp+30h] [xbp-70h] BYREF char *longStorage; // [xsp+40h] [xbp-60h] cocos2d::CCPoint v57; // 0:kr00_8.8 cocos2d::CCPoint v58; // 0:kr08_8.8 cocos2d::CCPoint v59; // 0:kr10_8.8 cocos2d::CCPoint v60; // 0:kr18_8.8 cocos2d::SEL_MenuHandler v61; // 0:x3.16 cocos2d::SEL_MenuHandler v62; // 0:x3.16 cocos2d::SEL_MenuHandler v63; // 0:x3.16 cocos2d::SEL_MenuHandler v64; // 0:x3.16 ((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; v5 = *(float *)&aFffO[4 * (a2->m_iconType == Ship)]; m_glowEnabled = 1; v7 = SimplePlayer::create(1); ((void (__fastcall *)(cocos2d::CCLayer *, SimplePlayer *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v7, 1); v8 = ((__n128 (__fastcall *)(SimplePlayer *, float))v7->setScale)(v7, v5); v9.n128_f32[0] = a1->m_height * 0.5; v8.n128_u32[0] = 1114636288; sub_100022980(v8, v9, __p); ((void (__fastcall *)(SimplePlayer *, void **))v7->setPosition)(v7, __p); v10 = GameManager::sharedState(); *(cocos2d::ccColor3B *)__p = GameManager::colorForIdx(v10, a1->m_score->m_color1); ((void (__fastcall *)(SimplePlayer *, void **))v7->setColor)(v7, __p); v11 = GameManager::sharedState(); *(cocos2d::ccColor3B *)__p = GameManager::colorForIdx(v11, a1->m_score->m_color2); SimplePlayer::setSecondColor(v7, (const cocos2d::ccColor3B *)__p); SimplePlayer::tryEnableCustomGlowColor(v7, a1->m_score->m_color3); v12 = a1->m_score; if ( v12->m_special != 2 ) m_glowEnabled = v12->m_glowEnabled; v7->m_hasGlowOutline = m_glowEnabled & 1; SimplePlayer::updatePlayerFrame(v7, v12->m_iconID, v12->m_iconType); SimplePlayer::updateColors(v7); v13 = (cocos2d::CCNode *)sub_1001D7ED0(0); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCNode *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v13); v14 = a1->m_score; if ( v14->m_userName.m_data.m_short.shortStorage.__elems_[22] < 0 ) { sub_1000097D0(__p, (void *)v14->m_userName.m_data.m_long.capacitym1, v14->m_userName.m_data.m_long.size); } else { *(_OWORD *)__p = *(_OWORD *)&v14->m_userName.m_data.m_short.sizex2; longStorage = v14->m_userName.m_data.m_long.longStorage; } if ( SHIBYTE(longStorage) < 0 ) { v15 = __p[1]; operator delete(__p[0]); if ( !v15 ) goto LABEL_13; } else if ( !HIBYTE(longStorage) ) { LABEL_13: v16 = a1->m_score; sub_100009900(&__str, "-"); std::string::operator=((std::string *)&v16->m_userName, &__str); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); } v17 = a1->m_score; if ( v17->m_userName.m_data.m_short.shortStorage.__elems_[22] < 0 ) { sub_1000097D0(__p, (void *)v17->m_userName.m_data.m_long.capacitym1, v17->m_userName.m_data.m_long.size); } else { *(_OWORD *)__p = *(_OWORD *)&v17->m_userName.m_data.m_short.sizex2; longStorage = v17->m_userName.m_data.m_long.longStorage; } if ( SHIBYTE(longStorage) >= 0 ) v18 = __p; else v18 = (void **)__p[0]; v19 = cocos2d::CCLabelBMFont::create_1((const char *)v18, "bigFont.fnt"); if ( SHIBYTE(longStorage) < 0 ) operator delete(__p[0]); cocos2d::CCLabelBMFont::limitLabelWidth(v19, 120.0, 0.8, 0.0); v20 = (float32x2_t *)((__int64 (__fastcall *)(SimplePlayer *))v7->getPosition)(v7); v21 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getContentSize)(v19) * 0.5; v22.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getScale)(v19); v22.n128_f32[0] = (float)(v21 * v22.n128_f32[0]) + 25.0; v23.n128_u32[0] = 0; sub_100022980(v22, v23, &v53); sub_1000229DC(v20, &v53, (float32x2_t *)__p); v61.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJRequestCell::onViewProfile; v61.adj = 0; v24 = CCMenuItemSpriteExtra::create(v19, nullptr, a1, v61); ((void (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v13->addChild)(v13, v24); v57 = cocos2d::CCNode::convertToNodeSpace(v13, (const cocos2d::CCPoint *)__p); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v24->setPosition)(v24, &v53, v57.x, v57.y); v25 = ButtonSprite::create_1("View", 50, 0, 0.6, 0, "bigFont.fnt", "GJ_button_01.png", 25.0); v62.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJRequestCell::onViewFriendRequest; v62.adj = 0; v26 = CCMenuItemSpriteExtra::create(v25, nullptr, a1, v62); CCMenuItemSpriteExtra::setSizeMult(v26, 1.5); ((void (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v13->addChild)(v13, v26); m_width = a1->m_width; v28.n128_f32[0] = (float)(m_width + (float)(*(float *)((__int64 (__fastcall *)(ButtonSprite *))v25->getContentSize)(v25) * -0.5)) + -45.0; v29.n128_f32[0] = a1->m_height * 0.5; sub_100022980(v28, v29, &v52); v58 = cocos2d::CCNode::convertToNodeSpace(v13, (const cocos2d::CCPoint *)&v52); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v26->setPosition)(v26, &v53, v58.x, v58.y); v30 = ButtonSprite::create_1("X", 50, 0, 0.6, 0, "bigFont.fnt", "GJ_button_06.png", 31.25); ((void (__fastcall *)(ButtonSprite *, float))v30->setScale)(v30, 0.8); m_label = v30->m_label; v32 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_label->getPosition)(m_label); v33.n128_u32[0] = 1.5; v34.n128_u32[0] = -0.5; sub_100022980(v33, v34, &v52); *(float32x2_t *)&v35 = sub_1000229DC(v32, &v52, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))m_label->setPosition)(m_label, &v53, v35); v63.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJRequestCell::onDeleteRequest; v63.adj = 0; v36 = CCMenuItemSpriteExtra::create(v30, nullptr, a1, v63); CCMenuItemSpriteExtra::setSizeMult(v36, 1.5); v37 = ((__n128 (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v13->addChild)(v13, v36); v37.n128_f32[0] = a1->m_width + -22.0; v38.n128_f32[0] = a1->m_height * 0.5; sub_100022980(v37, v38, &v52); v59 = cocos2d::CCNode::convertToNodeSpace(v13, (const cocos2d::CCPoint *)&v52); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, float, float))v36->setPosition)(v36, &v53, v59.x, v59.y); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v39->setScale)(v39, 0.7); ((void (__fastcall *)(cocos2d::CCSprite *, float))v40->setScale)(v40, 0.7); v64.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJRequestCell::onToggle; v64.adj = 0; v41 = CCMenuItemToggler::create(v40, v39, a1, v64); a1->m_toggler = v41; CCMenuItemToggler::toggle(v41, a1->m_score->m_toggled); v42 = ((__n128 (__fastcall *)(cocos2d::CCNode *, CCMenuItemToggler *))v13->addChild)(v13, a1->m_toggler); m_toggler = a1->m_toggler; v44.n128_f32[0] = a1->m_height * 0.5; v42.n128_u32[0] = 20.0; sub_100022980(v42, v44, &v52); v60 = cocos2d::CCNode::convertToNodeSpace(v13, (const cocos2d::CCPoint *)&v52); ((void (__fastcall *)(CCMenuItemToggler *, float32x2_t *, float, float))m_toggler->setPosition)( m_toggler, &v53, v60.x, v60.y); CCMenuItemToggler::setSizeMult(a1->m_toggler, 1.2); if ( a1->m_score->m_newFriendRequest ) { v45 = cocos2d::CCLabelBMFont::create_1("!", "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v45->setColor)(v45, &unk_100636CD0); v46 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v45->setScale)(v45, 0.5); v46.n128_u32[0] = 0; v47.n128_u32[0] = 0.5; sub_100022980(v46, v47, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v45->setAnchorPoint)(v45, &v53); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v45, 10); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v45->setTag)(v45, 100); v48 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getContentSize)(v19) * 0.5; v49.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v19->getScale)(v19); v49.n128_f32[0] = (float)(v48 * v49.n128_f32[0]) + 5.0; v50.n128_u32[0] = 0; sub_100022980(v49, v50, &v52); *(float32x2_t *)&v51 = sub_1000229DC((float32x2_t *)__p, &v52, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v45->setPosition)(v45, &v53, v51); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source