//
// GameManager::finishedLoadingBGAsync from 0x5e7f54 to 0x5e7fe8 (148 bytes)
//
// 3 xrefs:
// > ??> @ 0xb4840
// > GameManager::loadBackgroundAsync @ 0x5ebf30
// > ??> @ 0x122e438
//
// 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 GameManager::finishedLoadingBGAsync(GameManager *a1, cocos2d::CCObject *a2)
{
GJBaseGameLayer *m_gameLayer; // x21
int v5; // w0
const char *m_loadedBgID; // x1
cocos2d::CCString *v7; // x0
cocos2d::CCTextureCache *v8; // x0
char *CString; // [xsp+38h] [xbp+38h]
a1->m_loadingBG = 0;
if ( a2 )
{
m_gameLayer = a1->m_gameLayer;
if ( m_gameLayer )
{
v5 = a2->getTag(a2);
GJBaseGameLayer::asyncBGLoaded(m_gameLayer, v5);
}
m_loadedBgID = (const char *)(unsigned int)a1->m_loadedBgID;
if ( (_DWORD)m_loadedBgID )
{
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"game_bg_%02d_001.png",
m_loadedBgID);
CString = (char *)cocos2d::CCString::getCString(v7);
v8 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v8, CString);
}
a1->m_loadedBgID = a2->getTag(a2);
}
}