//
// GameManager::loadBackgroundAsync from 0x1003833b0 to 0x100383438 (136 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::swapBackground @ 0x1001145d1
//
// 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)
{
char v2; // al
int v3; // eax
int v4; // ebx
cocos2d::CCTextureCache *v5; // r15
cocos2d::CCString *v6; // rax
const char *CString; // rax
char v8; // [rsp+0h] [rbp-20h]
v8 = v2;
v3 = 59;
if ( a2 < 59 )
v3 = a2;
v4 = 1;
if ( v3 >= 2 )
v4 = v3;
if ( !a1->m_loadingBG && v4 != a1->m_loadedBgID )
{
a1->m_loadingBG = 1;
v5 = cocos2d::CCTextureCache::sharedTextureCache();
v6 = (cocos2d::CCString *)sub_1007AB580("game_bg_%02d_001.png", v8);
CString = cocos2d::CCString::getCString(v6);
cocos2d::CCTextureCache::addImageAsync(
v5,
CString,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)GameManager::finishedLoadingBGAsync,
v4,
kCCTexture2DPixelFormat_RGBA8888);
}
}