//
// cocos2d::CCLabelBMFont::setFntFile from 0x18004e140 to 0x18004e227 (231 bytes)
//
// 4 xrefs:
// > ??> @ 0x180140c50
// > ??> @ 0x180140c84
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bbcd4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:44 +0000
//
void __fastcall cocos2d::CCLabelBMFont::setFntFile(cocos2d::CCLabelBMFont *this, cocos2d *a2)
{
const char *v3; // rdx
const char *v5; // rdx
cocos2d::CCObject *File; // rsi
size_t v7; // rax
cocos2d::CCObject *v8; // rcx
char *v9; // rsi
__int64 v10; // rbx
cocos2d::CCTextureCache *v11; // rax
struct cocos2d::CCTexture2D *v12; // rax
if ( a2 )
{
v3 = (char *)this + 384;
if ( *((_QWORD *)this + 51) > 0xFu )
v3 = *((const char **)this + 48);
if ( strcmp((const char *)a2, v3) )
{
File = cocos2d::FNTConfigLoadFile(a2, v5);
v7 = strlen((const char *)a2);
sub_1800101E0((void **)this + 48, a2, v7);
if ( File )
cocos2d::CCObject::retain(File);
v8 = *((cocos2d::CCObject **)this + 58);
if ( v8 )
cocos2d::CCObject::release(v8);
*((_QWORD *)this + 58) = File;
v9 = (char *)File + 88;
if ( *((_QWORD *)v9 + 3) > 0xFu )
v9 = *(char **)v9;
v10 = *((_QWORD *)this + 40);
v11 = cocos2d::CCTextureCache::sharedTextureCache();
v12 = cocos2d::CCTextureCache::addImage(v11, v9, 0);
(*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(v10 + 24))((char *)this + 320, v12);
cocos2d::CCLabelBMFont::createFontChars(this);
}
}
}