//
// GJLocalLevelScoreCell::loadFromScore from 0x100109540 to 0x100109748 (520 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x100101084
//
// 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)
{
GJLocalScore *m_localScore; // x8
char *v5; // x1
std::string *v6; // x0
cocos2d::CCSprite *v7; // x20
__n128 v8; // q0
__n128 v9; // q1
std::string *p_p; // x0
cocos2d::CCLabelBMFont *v11; // x20
__n128 v12; // q0
__n128 v13; // q1
__n128 v14; // q1
__n128 v15; // q0
int v16; // [xsp+0h] [xbp-50h] BYREF
std::string v17; // [xsp+8h] [xbp-48h] BYREF
std::string __p; // [xsp+20h] [xbp-30h] BYREF
((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1);
a1->m_localScore = a2;
sub_100009900(&__p, "");
m_localScore = a1->m_localScore;
if ( m_localScore->m_type )
GameToolbox::pointsToString((unsigned int)m_localScore->m_points, (__int64)&v17);
else
GameToolbox::msToTimeString(m_localScore->m_points, 1, &v17);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
__p = v17;
if ( a1->m_localScore->m_type == 1 )
v5 = "GJ_pointsIcon_001.png";
else
v5 = "GJ_timeIcon_001.png";
sub_100009900(&v17, v5);
if ( (v17.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v6 = &v17;
else
v6 = (std::string *)v17.__r_.__value_.__r.__words[0];
v7 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v6);
((void (__fastcall *)(cocos2d::CCSprite *, float))v7->setScale)(v7, 0.55);
v8 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v7,
20);
v9.n128_f32[0] = a1->m_height * 0.5;
v8.n128_u32[0] = 20.0;
sub_100022980(v8, v9, &v16);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v7->setPosition)(v7, &v16);
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
v11 = cocos2d::CCLabelBMFont::create_1((const char *)p_p, "bigFont.fnt");
v12 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v11,
2);
v12.n128_u32[0] = 0;
v13.n128_u32[0] = 0.5;
sub_100022980(v12, v13, &v16);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int *))v11->setAnchorPoint)(v11, &v16);
cocos2d::CCLabelBMFont::limitLabelWidth(v11, 200.0, 0.46, 0.0);
v14.n128_f32[0] = (float)(a1->m_height * 0.5) + 0.5;
v15.n128_u32[0] = 1109393408;
sub_100022980(v15, v14, &v16);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int *))v11->setPosition)(v11, &v16);
if ( SHIBYTE(v17.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v17.__r_.__value_.__l.__data_);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
}