//
// cocos2d::CCLabelAtlas::setString from 0x100799c10 to 0x100799cd7 (199 bytes)
//
// 2 xrefs:
// > sub_100799CE0 @ 0x100799cec
// > ??> @ 0x10098e588
//
// 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 cocos2d::CCLabelAtlas::setString(cocos2d::CCLabelAtlas *a1, const char *a2)
{
__int64 v2; // rax
unsigned int v3; // r14d
float v4[8]; // [rsp+0h] [rbp-20h] BYREF
*(_QWORD *)v4 = v2;
v3 = strlen(a2);
if ( ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pTextureAtlas->getTotalQuads)(a1->m_pTextureAtlas) < v3 )
cocos2d::CCTextureAtlas::resizeCapacity(a1->m_pTextureAtlas, v3);
if ( (a1->m_sString.m_data.m_short.sizex2 & 1) != 0 )
{
*a1->m_sString.m_data.m_long.longStorage = 0;
a1->m_sString.m_data.m_long.size = 0;
}
else
{
*(_WORD *)&a1->m_sString.m_data.m_short.sizex2 = 0;
}
std::string::assign((std::string *)&a1->m_sString, a2);
((void (__fastcall *)(cocos2d::CCLabelAtlas *))a1->updateAtlasValues)(a1);
sub_10028CBF0(v4, (float)(int)(v3 * a1->m_uItemWidth), (float)(int)a1->m_uItemHeight);
((void (__fastcall *)(cocos2d::CCLabelAtlas *, float *))a1->setContentSize)(a1, v4);
a1->m_uQuadsToDraw = v3;
}