//
// GameManager::loadBackgroundAsync from 0x1003184c8 to 0x100318574 (172 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::swapBackground @ 0x1001dde40
//
// 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 GameManager::loadBackgroundAsync(GameManager *a1, int a2)
{
int v2; // w8
int v3; // w20
cocos2d::CCTextureCache *v5; // x21
cocos2d::CCString *v6; // x0
const char *CString; // x1
cocos2d::SEL_MenuHandler v8; // 0:x3.16
if ( a2 >= 59 )
v2 = 59;
else
v2 = a2;
if ( v2 <= 1 )
v3 = 1;
else
v3 = v2;
if ( !a1->m_loadingBG && v3 != a1->m_loadedBgID )
{
a1->m_loadingBG = 1;
v5 = cocos2d::CCTextureCache::sharedTextureCache();
v6 = (cocos2d::CCString *)sub_100268F4C("game_bg_%02d_001.png", v3);
CString = cocos2d::CCString::getCString(v6);
v8.ptr = (void (__cdecl *)(cocos2d::CCObject *))GameManager::finishedLoadingBGAsync;
v8.adj = 0;
cocos2d::CCTextureCache::addImageAsync(v5, CString, a1, v8, v3, kCCTexture2DPixelFormat_RGBA8888);
}
}