//
// GameManager::finishedLoadingMGAsync from 0x32292c to 0x322982 (86 bytes)
//
// 2 xrefs:
// > GameManager::finishedLoadingMGAsync1 @ 0x3229ac
// > GameManager::finishedLoadingMGAsync2 @ 0x3229d2
//
// 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::finishedLoadingMGAsync(GameManager *a1, int a2)
{
GJBaseGameLayer *m_gameLayer; // r0
const char *m_loadedMG; // r1
cocos2d::CCString *v6; // r0
const char *CString; // r7
cocos2d::CCString *v8; // r0
const char *v9; // r6
cocos2d::CCTextureCache *v10; // r0
cocos2d::CCTextureCache *v11; // r0
a1->m_loadingG1 = 0;
m_gameLayer = a1->m_gameLayer;
if ( m_gameLayer )
GJBaseGameLayer::asyncMGLoaded(m_gameLayer, a2);
m_loadedMG = (const char *)a1->m_loadedMG;
if ( m_loadedMG )
{
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"fg_%02d_001.png", m_loadedMG);
CString = cocos2d::CCString::getCString(v6);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"fg_%02d_2_001.png",
(const char *)a1->m_loadedMG);
v9 = cocos2d::CCString::getCString(v8);
v10 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v10, CString);
v11 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v11, v9);
}
a1->m_loadedMG = a2;
}