//
// StatsCell::loadFromObject from 0x334a1c to 0x334c42 (550 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x33bc2a
//
// 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 StatsCell::loadFromObject(StatsCell *a1, StatsObject *a2)
{
const char *m_value; // r6
cocos2d::CCLabelBMFont *v5; // r5
void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // r4
float v7; // s16
cocos2d::CCString *v8; // r0
cocos2d::CCLabelBMFont *v9; // r4
void (__fastcall *v10)(cocos2d::CCLabelBMFont *__hidden, float); // r6
float v11; // s16
void (__fastcall *v12)(cocos2d::CCLabelBMFont *__hidden, float); // r6
int v13; // r1
void (__fastcall *v14)(cocos2d::CCLabelBMFont *__hidden, float); // r6
int v15; // r1
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v17)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v19)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCPoint v20; // [sp+4h] [bp-10h] BYREF
a1->m_backgroundLayer->setOpacity(a1->m_backgroundLayer, 255);
a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, 1);
m_value = (const char *)a2->m_value;
StatsCell::getTitleFromKey(a1, (const char *)a2->m_key);
v5 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v5);
if ( v5->getContentSize(v5)->width > 200.0 )
{
setScale = v5->setScale;
if ( (float)(200.0 / v5->getContentSize(v5)->width) >= 1.0 )
v7 = 1.0;
else
v7 = 200.0 / v5->getContentSize(v5)->width;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))setScale)(v5, LODWORD(v7));
}
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", m_value);
cocos2d::CCString::getCString(v8);
v9 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v9);
if ( v9->getContentSize(v9)->width > 100.0 )
{
v10 = v9->setScale;
if ( (float)(100.0 / v9->getContentSize(v9)->width) >= 1.0 )
v11 = 1.0;
else
v11 = 100.0 / v9->getContentSize(v9)->width;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v10)(v9, LODWORD(v11));
}
v12 = v5->setScale;
if ( v5->getScale(v5) > 0.7 )
v13 = 1060320051;
else
v13 = ((int (__fastcall *)(cocos2d::CCLabelBMFont *))v5->getScale)(v5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v12)(v5, v13);
v14 = v9->setScale;
if ( v9->getScale(v9) > 0.7 )
v15 = 1060320051;
else
v15 = ((int (__fastcall *)(cocos2d::CCLabelBMFont *))v9->getScale)(v9);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v14)(v9, v15);
setAnchorPoint = v5->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v20, 0.0, 0.5);
setAnchorPoint(v5, &v20);
v17 = v9->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v20, 1.0, 0.5);
v17(v9, &v20);
setPosition = v5->setPosition;
cocos2d::CCPoint::CCPoint(&v20, 20.0, (float)(a1->m_height * 0.5) - 1.0);
setPosition(v5, &v20);
v19 = v9->setPosition;
cocos2d::CCPoint::CCPoint(&v20, 330.0, (float)(a1->m_height * 0.5) - 1.0);
v19(v9, &v20);
}