//
// SelectFontLayer2::loadPreviewSheet from 0xd03014 to 0xd030f8 (228 bytes)
//
// 2 xrefs:
// > SelectFontLayer2::init @ 0xd033ec
// > ??> @ 0xe7508
//
// This function is hookable on this platform (idp: arm, 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 13:06:55 +0000
//
__int64 __fastcall SelectFontLayer2::loadPreviewSheet(SelectFontLayer2 *this)
{
cocos2d::CCFileUtils *v2; // x0
__int64 v4; // x0
cocos2d::CCSpriteFrameCache *v5; // x0
cocos2d::CCSpriteFrameCache *v6; // x0
char v7; // w0
__int64 v8; // [xsp+30h] [xbp+30h] BYREF
cocos2d::CCSpriteFrameCache *v9; // [xsp+38h] [xbp+38h]
void *v10; // [xsp+40h] [xbp+40h]
v2 = (cocos2d::CCFileUtils *)*((unsigned __int8 *)this + 688);
if ( !(_DWORD)v2 )
{
v4 = cocos2d::CCFileUtils::sharedFileUtils(v2);
(*(void (__fastcall **)(__int64 *__return_ptr, __int64, const char *, _QWORD))(*(_QWORD *)v4 + 48LL))(
&v8,
v4,
"GJ_FontSheet.png",
0);
if ( (v8 & 1) != 0 )
{
v5 = v9;
if ( !v9 )
{
LABEL_5:
operator delete(v10);
return _stack_chk_guard;
}
}
else
{
v5 = (cocos2d::CCSpriteFrameCache *)((int)(unsigned __int8)v8 >> 1);
if ( !(_DWORD)v5 )
return _stack_chk_guard;
}
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v5);
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v6, "GJ_FontSheet.plist");
v7 = v8;
*((_BYTE *)this + 688) = 1;
if ( (v7 & 1) == 0 )
return _stack_chk_guard;
goto LABEL_5;
}
return _stack_chk_guard;
}