//
// cocos2d::CCLabelBMFont::setFntFile from 0x1005db440 to 0x1005db519 (217 bytes)
//
// 0 xrefs:
//
// 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::CCLabelBMFont::setFntFile(cocos2d::CCLabelBMFont *a1, const char *a2)
{
cocos2d::CCBMFontConfiguration *File; // r15
cocos2d::CCBMFontConfiguration *m_pConfiguration; // rdi
cocos2d::CCTextureCache *v5; // rax
cocos2d::CCBMFontConfiguration *v6; // rsi
const char *longStorage; // rsi
cocos2d::CCTexture2D *v8; // rax
if ( a2 )
{
if ( (a1->m_sFntFile.m_data.m_short.sizex2 & 1) != 0 )
{
if ( !strcmp(a2, a1->m_sFntFile.m_data.m_long.longStorage) )
return;
}
else if ( !strcmp(a2, a1->m_sFntFile.m_data.m_short.shortStorage.__elems_) )
{
return;
}
File = cocos2d::FNTConfigLoadFile(a2);
std::string::assign((std::string *)&a1->m_sFntFile, a2);
if ( File )
cocos2d::CCObject::retain(File);
m_pConfiguration = a1->m_pConfiguration;
if ( m_pConfiguration )
cocos2d::CCObject::release(m_pConfiguration);
a1->m_pConfiguration = File;
v5 = cocos2d::CCTextureCache::sharedTextureCache();
v6 = a1->m_pConfiguration;
if ( (v6->m_sAtlasName.m_data.m_short.sizex2 & 1) != 0 )
longStorage = v6->m_sAtlasName.m_data.m_long.longStorage;
else
longStorage = v6->m_sAtlasName.m_data.m_short.shortStorage.__elems_;
v8 = cocos2d::CCTextureCache::addImage(v5, longStorage, 0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCTexture2D *))a1->setTexture)(a1, v8);
cocos2d::CCLabelBMFont::createFontChars(a1);
}
}