//
// GJScoreCell::loadFromScore from 0x337290 to 0x337fb0 (3360 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x33bcce
//
// 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 GJScoreCell::loadFromScore(GJScoreCell *a1, GJUserScore *a2)
{
int m_creatorPoints; // r2
float v5; // r5
SimplePlayer *v6; // r6
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
void (__fastcall *setColor)(SimplePlayer *__hidden, const cocos2d::ccColor3B *); // r7
GameManager *v9; // r0
int v10; // r0
GameManager *v11; // r0
int v12; // r0
GJUserScore *m_score; // r3
int m_iconID; // r1
char v15; // r2
cocos2d::CCMenuItem *v16; // r1
cocos2d::CCNode *v17; // r11
GJUserScore *v18; // r3
cocos2d::CCString *v19; // r0
cocos2d::CCLabelBMFont *v20; // r7
void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCLabelBMFont *v22; // r7
CCMenuItemSpriteExtra *v23; // r8
float width; // s18
float v25; // s18
int v26; // r10
float v27; // s17
float v28; // r0
int v29; // r11
cocos2d::CCLayerColor *m_backgroundLayer; // r0
void (__fastcall *v31)(cocos2d::CCLayerColor *__hidden, const cocos2d::ccColor3B *); // r3
unsigned int m_stars; // r6
float v33; // s19
float v34; // r7
int v35; // s15
unsigned int m_moons; // r10
LeaderboardStat m_leaderboardStat; // r3
unsigned int v38; // r3
unsigned int v39; // r3
unsigned int v40; // r3
cocos2d::CCLabelBMFont *v41; // r6
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCSprite *v44; // r8
void (__fastcall *v45)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5
int v46; // r11
float v47; // s17
float v48; // r0
cocos2d::CCLabelBMFont *v49; // r5
void (__fastcall *v50)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v51)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
int v52; // r10
float v53; // s17
float v54; // s15
cocos2d::CCSprite *v55; // r8
void (__fastcall *v56)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
int v57; // r11
float v58; // s17
float v59; // r0
cocos2d::CCLabelBMFont *v60; // r5
void (__fastcall *v61)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCSprite *v63; // r9
void (__fastcall *v64)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
int v65; // r10
float v66; // s16
float v67; // r0
cocos2d::CCLabelBMFont *v68; // r5
void (__fastcall *v69)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *v70)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v71; // r10
float v72; // s16
float v73; // s15
cocos2d::CCSprite *v74; // r6
void (__fastcall *v75)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
int v76; // r11
float v77; // s16
float v78; // r0
cocos2d::CCLabelBMFont *v79; // r5
void (__fastcall *v80)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v81)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
int v82; // r11
float v83; // s16
float v84; // s15
cocos2d::CCSprite *v85; // r6
void (__fastcall *v86)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
int v87; // r11
float v88; // s16
float v89; // r0
cocos2d::CCLabelBMFont *v90; // r5
void (__fastcall *v91)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v92)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v93; // r10
float v94; // s16
float v95; // s15
cocos2d::CCSprite *v96; // r8
void (__fastcall *v97)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
int v98; // r11
float v99; // s16
float v100; // r0
cocos2d::CCLabelBMFont *v101; // r5
void (__fastcall *v102)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v103)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
int v104; // r10
float v105; // s16
float v106; // s15
cocos2d::CCSprite *v107; // r6
void (__fastcall *v108)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
int v109; // r9
float v110; // s16
float v111; // r0
void (__fastcall *v112)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
void (__fastcall *v113)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-68h]
void (__fastcall *v114)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-68h]
float v115; // [sp+Ch] [bp-68h]
unsigned int m_demons; // [sp+14h] [bp-60h]
unsigned int m_userCoins; // [sp+18h] [bp-5Ch]
_BOOL4 v118; // [sp+1Ch] [bp-58h]
cocos2d::CCSprite *v119; // [sp+24h] [bp-50h] BYREF
cocos2d::CCSprite *v120; // [sp+28h] [bp-4Ch] BYREF
cocos2d::CCSprite *v121; // [sp+2Ch] [bp-48h] BYREF
cocos2d::CCSprite *v122; // [sp+30h] [bp-44h] BYREF
cocos2d::CCLabelBMFont *v123; // [sp+34h] [bp-40h] BYREF
cocos2d::CCLabelBMFont *v124; // [sp+38h] [bp-3Ch] BYREF
cocos2d::CCLabelBMFont *v125; // [sp+3Ch] [bp-38h] BYREF
cocos2d::CCLabelBMFont *v126; // [sp+40h] [bp-34h] BYREF
_BYTE v127[8]; // [sp+44h] [bp-30h] BYREF
cocos2d::CCPoint v128; // [sp+4Ch] [bp-28h] BYREF
cocos2d::CCPoint v129; // [sp+54h] [bp-20h] BYREF
cocos2d::CCPoint v130; // [sp+5Ch] [bp-18h] BYREF
cocos2d::CCPoint v131; // [sp+64h] [bp-10h] BYREF
a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, 1);
m_creatorPoints = a2->m_creatorPoints;
a1->m_score = a2;
v118 = m_creatorPoints > 0;
if ( a2->m_iconType == Ship )
v5 = 0.9;
else
v5 = 1.0;
v6 = SimplePlayer::create((int)&dword_0 + 1);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v6, 1);
v6->setScale(v6, COERCE_FLOAT(LODWORD(v5)));
setPosition = v6->setPosition;
cocos2d::CCPoint::CCPoint(&v131, 30.0, (float)(a1->m_height * 0.5) + 7.0);
setPosition(v6, &v131);
setColor = v6->setColor;
v9 = GameManager::sharedState();
*(cocos2d::ccColor3B *)&v10 = GameManager::colorForIdx(v9, a1->m_score->m_color1);
LOWORD(v131.x) = v10;
BYTE2(v131.x) = BYTE2(v10);
setColor(v6, (const cocos2d::ccColor3B *)&v131);
v11 = GameManager::sharedState();
*(cocos2d::ccColor3B *)&v12 = GameManager::colorForIdx(v11, a1->m_score->m_color2);
LOWORD(v131.x) = v12;
BYTE2(v131.x) = BYTE2(v12);
SimplePlayer::setSecondColor(v6, (const cocos2d::ccColor3B *)&v131);
SimplePlayer::tryEnableCustomGlowColor(v6, a1->m_score->m_color3);
m_score = a1->m_score;
m_iconID = m_score->m_iconID;
v15 = m_score->m_special == 2 || m_score->m_glowEnabled;
v6->m_hasGlowOutline = v15;
SimplePlayer::updatePlayerFrame(v6, m_iconID, m_score->m_iconType);
SimplePlayer::updateColors(v6);
v17 = (cocos2d::CCNode *)cocos2d::CCMenu::create(nullptr, v16);
a1->m_mainLayer->addChild(a1->m_mainLayer, v17);
v18 = a1->m_score;
if ( v18->m_scoreType != 2 )
{
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)v18->m_playerRank);
cocos2d::CCString::getCString(v19);
v20 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v20);
v21 = v20->setPosition;
cocos2d::CCPoint::CCPoint(&v131, 30.0, (float)(a1->m_height * 0.5) - 18.0);
v21(v20, &v131);
cocos2d::CCLabelBMFont::limitLabelWidth(v20, 40.0, 0.65, 0.0);
}
sub_775C20(&v131, &a1->m_score->m_userName);
v22 = cocos2d::CCLabelBMFont::create();
sub_774008(&v131);
cocos2d::CCLabelBMFont::limitLabelWidth(v22, 120.0, 0.8, 0.0);
v131.y = 0.0;
LODWORD(v131.x) = GJScoreCell::onViewProfile;
v23 = CCMenuItemSpriteExtra::create(
v22,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(GJScoreCell::onViewProfile, (unsigned int)a1));
v17->addChild(v17, v23);
width = v22->getContentSize(v22)->width;
v25 = width * COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v22->getScale)(v22));
v26 = (int)v6->getPosition(v6);
cocos2d::CCPoint::CCPoint(&v130, 30.0, 7.0);
cocos2d::CCPoint::operator+(v127, v26, &v130);
v113 = v23->setPosition;
v27 = v22->getContentSize(v22)->width;
v28 = v22->getScale(v22);
cocos2d::CCPoint::CCPoint(&v128, (float)(v27 * 0.5) * v28, 0.0);
cocos2d::CCPoint::operator+(&v129, v127, &v128);
cocos2d::CCNode::convertToNodeSpace(&v130, v17, &v129);
v113(v23, &v130);
if ( a1->m_score->m_scoreType == 2 )
{
v114 = v6->setPosition;
v29 = (int)v6->getPosition(v6);
cocos2d::CCPoint::CCPoint(&v129, 0.0, -7.0);
cocos2d::CCPoint::operator+(&v130, v29, &v129);
v114(v6, &v130);
}
if ( GJUserScore::isCurrentUser(a1->m_score) )
{
m_backgroundLayer = a1->m_backgroundLayer;
v31 = m_backgroundLayer->setColor;
LOWORD(v130.x) = -26906;
BYTE2(v130.x) = 10;
v31(m_backgroundLayer, (const cocos2d::ccColor3B *)&v130);
}
if ( a2->m_accountID <= 0 && a2->m_scoreType != 1 )
{
v112 = v22->setColor;
LOWORD(v130.x) = -166;
BYTE2(v130.x) = -1;
v112(v22, (const cocos2d::ccColor3B *)&v130);
v23->setEnabled(v23, 0);
}
m_stars = a1->m_score->m_stars;
v33 = (float)(a1->m_height * 0.5) - 13.0;
if ( v118 )
v34 = 0.45;
else
v34 = 0.5;
v35 = 1112014848;
if ( v118 )
v35 = 1108082688;
v115 = *(float *)&v35;
sub_776584((int)&v119, "GJ_starsIcon_001.png");
m_moons = a1->m_score->m_moons;
sub_776584((int)&v120, "GJ_moonsIcon_001.png");
m_demons = a1->m_score->m_demons;
sub_776584((int)&v121, "GJ_demonIcon_001.png");
m_userCoins = a1->m_score->m_userCoins;
sub_776584((int)&v122, "GJ_coinsIcon2_001.png");
if ( a1->m_score->m_leaderboardStat )
{
sub_775C20(&v130, &v119);
m_leaderboardStat = a1->m_score->m_leaderboardStat;
switch ( m_leaderboardStat )
{
case Demons:
sub_775D40(&v119, &v121);
sub_775D40(&v121, &v130);
v39 = m_stars;
m_stars = m_demons;
m_demons = v39;
break;
case UserCoins:
sub_775D40(&v119, &v122);
sub_775D40(&v122, &v130);
v40 = m_stars;
m_stars = m_userCoins;
m_userCoins = v40;
break;
case Moons:
sub_775D40(&v119, &v120);
sub_775D40(&v120, &v130);
v38 = m_stars;
m_stars = m_moons;
m_moons = v38;
break;
}
sub_774008(&v130);
}
GameToolbox::pointsToString((GameToolbox *)&v123, m_stars);
v41 = cocos2d::CCLabelBMFont::create();
sub_774008(&v123);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v41, 2);
setAnchorPoint = v41->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
setAnchorPoint(v41, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v41, 60.0, v34, 0.0);
v43 = v41->setPosition;
cocos2d::CCPoint::CCPoint(&v129, v25 + 5.0, -2.0);
cocos2d::CCPoint::operator+(&v130, v127, &v129);
v43(v41, &v130);
v44 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v119);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v44, 2);
v45 = v44->setPosition;
v46 = (int)v41->getPosition(v41);
v47 = v41->getContentSize(v41)->width;
v48 = v41->getScale(v41);
cocos2d::CCPoint::CCPoint(&v129, (float)(v47 * v48) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v46, &v129);
v45(v44, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v44->setScale)(v44, 1060320051);
GameToolbox::pointsToString((GameToolbox *)&v124, m_moons);
v49 = cocos2d::CCLabelBMFont::create();
sub_774008(&v124);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v49, 2);
v50 = v49->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
v50(v49, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v49, 60.0, v34, 0.0);
v51 = v49->setPosition;
v52 = (int)v44->getPosition(v44);
v53 = v44->getContentSize(v44)->width;
v54 = (float)(v53 * v44->getScale(v44)) * 0.5 + 8.0;
cocos2d::CCPoint::CCPoint(&v129, v54, 0.0);
cocos2d::CCPoint::operator+(&v130, v52, &v129);
v51(v49, &v130);
v55 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v120);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v55, 2);
v56 = v55->setPosition;
v57 = (int)v49->getPosition(v49);
v58 = v49->getContentSize(v49)->width;
v59 = v49->getScale(v49);
cocos2d::CCPoint::CCPoint(&v129, (float)(v58 * v59) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v57, &v129);
v56(v55, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v55->setScale)(v55, 1060320051);
GameToolbox::pointsToString((GameToolbox *)&v125, a1->m_score->m_diamonds);
v60 = cocos2d::CCLabelBMFont::create();
sub_774008(&v125);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v60, 2);
v61 = v60->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
v61(v60, &v130);
v62 = v60->setPosition;
cocos2d::CCPoint::CCPoint(&v130, 62.0, v33);
v62(v60, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v60, v115, v34, 0.0);
v63 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_diamondsIcon_001.png");
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v63, 2);
v64 = v63->setPosition;
v65 = (int)v60->getPosition(v60);
v66 = v60->getContentSize(v60)->width;
v67 = v60->getScale(v60);
cocos2d::CCPoint::CCPoint(&v129, (float)(v66 * v67) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v65, &v129);
v64(v63, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v63->setScale)(v63, 1060320051);
GameToolbox::pointsToString((GameToolbox *)&v126, a1->m_score->m_secretCoins);
v68 = cocos2d::CCLabelBMFont::create();
sub_774008(&v126);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v68, 2);
v69 = v68->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
v69(v68, &v130);
v70 = v68->setPosition;
v71 = (int)v63->getPosition(v63);
v72 = v63->getContentSize(v63)->width;
v73 = (float)(v72 * v63->getScale(v63)) * 0.5 + 8.0;
cocos2d::CCPoint::CCPoint(&v129, v73, 0.0);
cocos2d::CCPoint::operator+(&v130, v71, &v129);
v70(v68, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v68, v115, v34, 0.0);
v74 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon_001.png");
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v74, 2);
v75 = v74->setPosition;
v76 = (int)v68->getPosition(v68);
v77 = v68->getContentSize(v68)->width;
v78 = v68->getScale(v68);
cocos2d::CCPoint::CCPoint(&v129, (float)(v77 * v78) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v76, &v129);
v75(v74, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v74->setScale)(v74, 1060320051);
GameToolbox::pointsToString((GameToolbox *)&v128, m_userCoins);
v79 = cocos2d::CCLabelBMFont::create();
sub_774008(&v128);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v79, 2);
v80 = v79->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
v80(v79, &v130);
v81 = v79->setPosition;
v82 = (int)v74->getPosition(v74);
v83 = v74->getContentSize(v74)->width;
v84 = (float)(v83 * v74->getScale(v74)) * 0.5 + 8.0;
cocos2d::CCPoint::CCPoint(&v129, v84, 0.0);
cocos2d::CCPoint::operator+(&v130, v82, &v129);
v81(v79, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v79, v115, v34, 0.0);
v85 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v122);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v85, 2);
v86 = v85->setPosition;
v87 = (int)v79->getPosition(v79);
v88 = v79->getContentSize(v79)->width;
v89 = v79->getScale(v79);
cocos2d::CCPoint::CCPoint(&v129, (float)(v88 * v89) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v87, &v129);
v86(v85, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v85->setScale)(v85, 1060320051);
GameToolbox::pointsToString((GameToolbox *)&v129, m_demons);
v90 = cocos2d::CCLabelBMFont::create();
sub_774008(&v129);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v90, 2);
v91 = v90->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
v91(v90, &v130);
v92 = v90->setPosition;
v93 = (int)v85->getPosition(v85);
v94 = v85->getContentSize(v85)->width;
v95 = (float)(v94 * v85->getScale(v85)) * 0.5 + 8.0;
cocos2d::CCPoint::CCPoint(&v129, v95, 0.0);
cocos2d::CCPoint::operator+(&v130, v93, &v129);
v92(v90, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v90, v115, v34, 0.0);
v96 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v121);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v96, 2);
v97 = v96->setPosition;
v98 = (int)v90->getPosition(v90);
v99 = v90->getContentSize(v90)->width;
v100 = v90->getScale(v90);
cocos2d::CCPoint::CCPoint(&v129, (float)(v99 * v100) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v98, &v129);
v97(v96, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v96->setScale)(v96, 1060320051);
if ( v118 )
{
GameToolbox::pointsToString((GameToolbox *)&v130, a1->m_score->m_creatorPoints);
v101 = cocos2d::CCLabelBMFont::create();
sub_774008(&v130);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v101, 2);
v102 = v101->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v130, 0.0, 0.5);
v102(v101, &v130);
v103 = v101->setPosition;
v104 = (int)v96->getPosition(v96);
v105 = v96->getContentSize(v96)->width;
v106 = (float)(v105 * v96->getScale(v96)) * 0.5 + 8.0;
cocos2d::CCPoint::CCPoint(&v129, v106, 0.0);
cocos2d::CCPoint::operator+(&v130, v104, &v129);
v103(v101, &v130);
cocos2d::CCLabelBMFont::limitLabelWidth(v101, v115, v34, 0.0);
v107 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hammerIcon_001.png");
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v107, 2);
v108 = v107->setPosition;
v109 = (int)v101->getPosition(v101);
v110 = v101->getContentSize(v101)->width;
v111 = v101->getScale(v101);
cocos2d::CCPoint::CCPoint(&v129, (float)(v110 * v111) + 10.0, 0.0);
cocos2d::CCPoint::operator+(&v130, v109, &v129);
v108(v107, &v130);
((void (__fastcall *)(cocos2d::CCSprite *, int))v107->setScale)(v107, 1060320051);
}
sub_774008(&v122);
sub_774008(&v121);
sub_774008(&v120);
sub_774008(&v119);
}