//
// GameManager::loadFont from 0x1003b4eac to 0x1003b4f54 (168 bytes)
//
// 5 xrefs:
// > SecretLayer5::init @ 0x10007d088
// > PlayLayer::prepareCreateObjectsFromSetup @ 0x10013ef24
// > sub_1003B4F54 @ 0x1003b4f7c
// > GameManager::getFontTexture @ 0x1003b4fe8
// > LevelEditorLayer::createObjectsFromSetup @ 0x1003f7b28
//
// 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 11:03:56 +0000
//
void __fastcall GameManager::loadFont(__int64 a1, int a2)
{
int v2; // w8
int v3; // w22
int v4; // w8
void *v7; // x0
__int64 CString; // x21
void *v9; // x0
void *v10; // x0
char *v11; // x20
void *v12; // x0
if ( a2 >= 59 )
v2 = 59;
else
v2 = a2;
v3 = v2 & ~(v2 >> 31);
v4 = *(_DWORD *)(a1 + 992);
if ( v3 != v4 )
{
if ( v4 )
{
v7 = sub_1003065B0("gjFont%02d.png", *(_DWORD *)(a1 + 992));
CString = cocos2d::CCString::getCString((__int64)v7);
v9 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey((__int64)v9, CString);
}
if ( a2 >= 1 )
{
v10 = sub_1003065B0("gjFont%02d.png", v3);
v11 = (char *)cocos2d::CCString::getCString((__int64)v10);
v12 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::addImage((__int64)v12, v11);
}
*(_DWORD *)(a1 + 992) = v3;
}
}