//
// GJLocalLevelScoreCell::loadFromScore from 0x10024b700 to 0x10024b8ea (490 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x10024256e
//
// 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 GJLocalLevelScoreCell::loadFromScore(GJLocalLevelScoreCell *a1, GJLocalScore *a2)
{
const char *v3; // rsi
__int64 v4; // r15
cocos2d::CCSprite *v5; // r14
const char *v6; // rdi
cocos2d::CCLabelBMFont *v7; // r14
__int128 v8; // [rsp+0h] [rbp-50h] BYREF
void *data; // [rsp+10h] [rbp-40h]
std::string __dst; // [rsp+18h] [rbp-38h] BYREF
_BYTE v11[32]; // [rsp+30h] [rbp-20h] BYREF
((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1);
a1->m_localScore = a2;
if ( a2->m_type )
GameToolbox::pointsToString(&__dst);
else
GameToolbox::msToTimeString(&__dst);
data = __dst.__r_.__value_.__l.__data_;
v8 = *(_OWORD *)&__dst.__r_.__value_.__l.0;
v3 = "GJ_timeIcon_001.png";
if ( a1->m_localScore->m_type == 1 )
v3 = "GJ_pointsIcon_001.png";
v4 = 2 * (unsigned int)(a1->m_localScore->m_type == 1);
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2
* (2
* (a1->m_localScore->m_type == 1)
+ 19));
memcpy((char *)&__dst.__r_.__value_.__l.0 + 1, v3, v4 + 19);
*((_BYTE *)&__dst.__r_.__value_.__r.__words[2] + v4 + 4) = 0;
v5 = cocos2d::CCSprite::createWithSpriteFrameName(__dst.__r_.__value_.__s.__data_);
((void (__fastcall *)(cocos2d::CCSprite *, float))v5->setScale)(v5, 0.55000001);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v5,
20);
sub_10028CBE0(v11, 20.0, a1->m_height * 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v5->setPosition)(v5, v11);
if ( (v8 & 1) != 0 )
v6 = (const char *)data;
else
v6 = (char *)&v8 + 1;
v7 = cocos2d::CCLabelBMFont::create_3(v6, "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v7,
2);
sub_10028CBE0(v11, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v7->setAnchorPoint)(v7, v11);
cocos2d::CCLabelBMFont::limitLabelWidth(v7, 200.0, 0.46000001, 0.0);
sub_10028CBE0(v11, 40.0, (float)(a1->m_height * 0.5) + 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v7->setPosition)(v7, v11);
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
if ( (v8 & 1) != 0 )
operator delete(data);
}