//
// GameManager::finishedLoadingMGAsync from 0x14027e000 to 0x14027e0bd (189 bytes)
//
// 5 xrefs:
// > GameManager::finishedLoadingMGAsync1 @ 0x14027dfac
// > GameManager::finishedLoadingMGAsync2 @ 0x14027dfec
// > ??> @ 0x1408ade44
// > ??> @ 0x1408ade54
// > ??> @ 0x14091cf28
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:28:58 +0000
//
void __fastcall GameManager::finishedLoadingMGAsync(__int64 a1, int a2)
{
__int64 v2; // rbx
int v5; // edx
cocos2d::CCString *v6; // rax
const char *CString; // rdi
cocos2d::CCString *v8; // rax
const char *v9; // rbx
cocos2d::CCTextureCache *v10; // rax
cocos2d::CCTextureCache *v11; // rax
v2 = *(_QWORD *)(a1 + 576);
*(_BYTE *)(a1 + 1034) = 0;
if ( v2 )
{
GJBaseGameLayer::createMiddleground(v2);
GJBaseGameLayer::updateLevelColors(v2);
}
v5 = *(_DWORD *)(a1 + 1020);
if ( v5 )
{
v6 = cocos2d::CCString::createWithFormat("fg_%02d_001.png", v5);
CString = cocos2d::CCString::getCString(v6);
v8 = cocos2d::CCString::createWithFormat("fg_%02d_2_001.png", *(_DWORD *)(a1 + 1020));
v9 = cocos2d::CCString::getCString(v8);
v10 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v10, CString);
v11 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v11, v9);
}
*(_DWORD *)(a1 + 1020) = a2;
}