// // GJRequestCell::loadFromScore from 0x61c11c to 0x61c958 (2108 bytes) // // 2 xrefs: // > CustomListView::loadCell @ 0x620610 // > @ 0xbc7f0 // // 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 GJRequestCell::loadFromScore(GJRequestCell *a1, GJUserScore *a2) { long double v4; // q0 GJUserScore *m_score; // x0 IconType m_iconType; // w0 SimplePlayer *v7; // x21 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 void (__fastcall *setColor)(SimplePlayer *__hidden, const cocos2d::ccColor3B *); // x22 GameManager *v10; // x0 GameManager *v11; // x0 GJUserScore *v12; // x1 char v13; // w3 IconType v14; // w2 int m_iconID; // w1 cocos2d::CCMenuItem *v16; // x1 cocos2d::CCNode *v17; // x22 cocos2d::CCArray **p_m_pTargetArray; // x0 cocos2d::CCArray *m_pTargetArray; // x24 cocos2d::CCLabelBMFont *v20; // x24 cocos2d::CCArray **v21; // x0 __int64 v22; // x21 float width; // s9 float v24; // s0 CCMenuItemSpriteExtra *v25; // x21 void (__fastcall *v26)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 const char *v27; // x6 cocos2d::CCNode *v28; // x28 CCMenuItemSpriteExtra *v29; // x21 cocos2d::CCNode *v30; // x0 float m_width; // s11 const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1 void (__fastcall *v33)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float *v34; // x0 const char *v35; // x6 cocos2d::CCNode *v36; // x21 cocos2d::CCComponentContainer *m_pComponentContainer; // x28 CCMenuItemSpriteExtra *v38; // x21 void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCSprite *v40; // x28 cocos2d::CCSprite *v41; // x21 CCMenuItemToggler *v42; // x0 CCMenuItemToggler *m_toggler; // x21 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 GJUserScore *v45; // x24 cocos2d::CCArray **v46; // x0 unsigned int *v47; // x1 int v48; // w2 cocos2d::CCLabelBMFont *v49; // x21 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x22 void (__fastcall *v51)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 float v52; // s8 float v53; // s0 unsigned int *p_m_nExtraKerning; // x1 int m_nExtraKerning; // w2 unsigned int *v56; // x1 int v57; // w2 void (__fastcall *visit)(cocos2d::CCComponentContainer *__hidden, float); // [xsp+88h] [xbp+88h] long double v59; // [xsp+90h] [xbp+90h] __int64 v60; // [xsp+90h] [xbp+90h] cocos2d::CCPoint v61; // [xsp+A0h] [xbp+A0h] BYREF cocos2d::CCPoint v62; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCLabelBMFont *v63; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCPoint v64; // 0:kr00_8.8 cocos2d::CCPoint v65; // 0:kr08_8.8 cocos2d::CCPoint v66; // 0:kr10_8.8 cocos2d::CCPoint v67; // 0:kr18_8.8 cocos2d::SEL_MenuHandler v68; // 0:x2.16 cocos2d::SEL_MenuHandler v69; // 0:x2.16 cocos2d::SEL_MenuHandler v70; // 0:x2.16 cocos2d::SEL_MenuHandler v71; // 0:x3.16 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); m_iconType = a2->m_iconType; a1->m_score = a2; if ( m_iconType == Ship ) LODWORD(v4) = 1062165544; else LODWORD(v4) = 1063675494; v59 = v4; v7 = SimplePlayer::create((int)&dword_0 + 1); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v7, 1); v7->setScale(v7, v59); setPosition = v7->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 60.0, a1->m_height * 0.5); setPosition(v7, (const cocos2d::CCPoint *)&v63); setColor = v7->setColor; v10 = GameManager::sharedState(); *(cocos2d::ccColor3B *)&v63 = GameManager::colorForIdx(v10, a1->m_score->m_color1); setColor(v7, (const cocos2d::ccColor3B *)&v63); v11 = GameManager::sharedState(); *(cocos2d::ccColor3B *)&v63 = GameManager::colorForIdx(v11, a1->m_score->m_color2); SimplePlayer::setSecondColor(v7, (const cocos2d::ccColor3B *)&v63); SimplePlayer::tryEnableCustomGlowColor(v7, a1->m_score->m_color3); v12 = a1->m_score; v13 = v12->m_special == 2 || v12->m_glowEnabled; v14 = v12->m_iconType; m_iconID = v12->m_iconID; v7->m_hasGlowOutline = v13; SimplePlayer::updatePlayerFrame(v7, m_iconID, v14); SimplePlayer::updateColors(v7); v17 = (cocos2d::CCNode *)cocos2d::CCMenu::create(nullptr, v16); a1->m_mainLayer->addChild(a1->m_mainLayer, v17); sub_D18D28(&v63, &a1->m_score->m_userName); p_m_pTargetArray = &v63[-1].m_pTargetArray; m_pTargetArray = v63[-1].m_pTargetArray; if ( &v63[-1].m_pTargetArray == (cocos2d::CCArray **)&qword_124B6B0 ) goto LABEL_9; if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v63[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v63[-1].m_nExtraKerning; v63[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning > 0 ) { LABEL_9: if ( !m_pTargetArray ) { LABEL_14: v45 = a1->m_score; sub_D153B8((int)&v63, &byte_F10E40); sub_D18EA8(&v45->m_userName, &v63); v46 = &v63[-1].m_pTargetArray; if ( &v63[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v47 = (unsigned int *)&v63[-1].m_nExtraKerning; do v48 = __ldaxr(v47); while ( __stlxr(v48 - 1, v47) ); } else { v48 = v63[-1].m_nExtraKerning; v63[-1].m_nExtraKerning = v48 - 1; } if ( v48 <= 0 ) operator delete(v46); } } } else { operator delete(p_m_pTargetArray); if ( !m_pTargetArray ) goto LABEL_14; } sub_D18D28(&v63, &a1->m_score->m_userName); v20 = cocos2d::CCLabelBMFont::create(); v21 = &v63[-1].m_pTargetArray; if ( &v63[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v56 = (unsigned int *)&v63[-1].m_nExtraKerning; do v57 = __ldaxr(v56); while ( __stlxr(v57 - 1, v56) ); } else { v57 = v63[-1].m_nExtraKerning; v63[-1].m_nExtraKerning = v57 - 1; } if ( v57 <= 0 ) operator delete(v21); } cocos2d::CCLabelBMFont::limitLabelWidth(v20, 120.0, 0.8, 0.0); v22 = (__int64)v7->getPosition(v7); width = v20->getContentSize(v20)->width; v24 = v20->getScale(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, (float)((float)(width * 0.5) * v24) + 25.0, 0.0); cocos2d::CCPoint::operator+(&v61, v22, &v63); v68.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v68.adj = (size_t)GJRequestCell::onViewProfile; v25 = CCMenuItemSpriteExtra::create(v20, nullptr, v68); v17->addChild(v17, v25); v26 = v25->setPosition; v64 = cocos2d::CCNode::convertToNodeSpace(v17, &v61); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v26)(v25, &v63, v64.x, v64.y); v28 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"View", (const char *)&dword_30 + 2, 0, 0, 0.6, "bigFont.fnt", "GJ_button_01.png", v27, 25.0); v69.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v69.adj = (size_t)GJRequestCell::onViewFriendRequest; v29 = CCMenuItemSpriteExtra::create(v28, nullptr, v69); CCMenuItemSpriteExtra::setSizeMult(v29, 1.5); v17->addChild(v17, v29); v30 = v28; m_width = a1->m_width; getContentSize = v28->getContentSize; v33 = v29->setPosition; v34 = (float *)getContentSize(v30); cocos2d::CCPoint::CCPoint(&v62, (float)(m_width - (float)(*v34 * 0.5)) - 45.0, a1->m_height * 0.5); v65 = cocos2d::CCNode::convertToNodeSpace(v17, &v62); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v33)(v29, &v63, v65.x, v65.y); v36 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"X", (const char *)&dword_30 + 2, 0, 0, 0.6, "bigFont.fnt", "GJ_button_06.png", v35, 31.25); v36->setScale(v36, 0.8); m_pComponentContainer = v36[1].m_pComponentContainer; visit = m_pComponentContainer->__vftable[2].visit; v60 = ((__int64 (__fastcall *)(cocos2d::CCComponentContainer *))m_pComponentContainer->__vftable[3].~CCComponentContainer)(m_pComponentContainer); cocos2d::CCPoint::CCPoint(&v62, 1.5, -0.5); cocos2d::CCPoint::operator+(&v63, v60, &v62); ((void (__fastcall *)(cocos2d::CCComponentContainer *, cocos2d::CCLabelBMFont **))visit)(m_pComponentContainer, &v63); v70.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v70.adj = (size_t)GJRequestCell::onDeleteRequest; v38 = CCMenuItemSpriteExtra::create(v36, nullptr, v70); CCMenuItemSpriteExtra::setSizeMult(v38, 1.5); v17->addChild(v17, v38); v39 = v38->setPosition; cocos2d::CCPoint::CCPoint(&v62, a1->m_width - 22.0, a1->m_height * 0.5); v66 = cocos2d::CCNode::convertToNodeSpace(v17, &v62); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v39)(v38, &v63, v66.x, v66.y); v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v41 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); v40->setScale(v40, 0.7); v41->setScale(v41, 0.7); v71.adj = 0; v71.ptr = (void (__cdecl *)(cocos2d::CCObject *))GJRequestCell::onToggle; v42 = CCMenuItemToggler::create(v41, v40, a1, v71); a1->m_toggler = v42; CCMenuItemToggler::toggle(v42, a1->m_score->m_toggled); v17->addChild(v17, a1->m_toggler); m_toggler = a1->m_toggler; v44 = m_toggler->setPosition; cocos2d::CCPoint::CCPoint(&v62, 20.0, a1->m_height * 0.5); v67 = cocos2d::CCNode::convertToNodeSpace(v17, &v62); ((void (__fastcall *)(CCMenuItemToggler *, cocos2d::CCLabelBMFont **, float, float))v44)( m_toggler, &v63, v67.x, v67.y); CCMenuItemToggler::setSizeMult(a1->m_toggler, 1.2); if ( a1->m_score->m_newFriendRequest ) { v49 = cocos2d::CCLabelBMFont::create(); v49->setColor(v49, (const cocos2d::ccColor3B *)&unk_EBE238); v49->setScale(v49, 0.5); setAnchorPoint = v49->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, 0.0, 0.5); setAnchorPoint(v49, (const cocos2d::CCPoint *)&v63); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v49, 10); v49->setTag(v49, 100); v51 = v49->setPosition; v52 = v20->getContentSize(v20)->width * 0.5; v53 = v20->getScale(v20); cocos2d::CCPoint::CCPoint(&v62, (float)(v52 * v53) + 5.0, 0.0); cocos2d::CCPoint::operator+(&v63, &v61, &v62); v51(v49, (const cocos2d::CCPoint *)&v63); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source