//
// GameManager::finishedLoadingMGAsync from 0x5ec128 to 0x5ec1b0 (136 bytes)
//
// 3 xrefs:
// > GameManager::finishedLoadingMGAsync1 @ 0x5ec1fc
// > GameManager::finishedLoadingMGAsync2 @ 0x5ec24c
// > ??> @ 0x7bbb8
//
// 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; // x0
const char *m_loadedMG; // x1
cocos2d::CCString *v6; // x0
const char *CString; // x22
cocos2d::CCString *v8; // x0
const char *v9; // x21
cocos2d::CCTextureCache *v10; // x0
cocos2d::CCTextureCache *v11; // x0
m_gameLayer = a1->m_gameLayer;
a1->m_loadingG1 = 0;
if ( m_gameLayer )
GJBaseGameLayer::asyncMGLoaded(m_gameLayer, a2);
m_loadedMG = (const char *)(unsigned int)a1->m_loadedMG;
if ( (_DWORD)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 *)(unsigned int)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;
}