//
// GameManager::unloadBackground from 0x100383260 to 0x1003832fd (157 bytes)
//
// 1 xrefs:
// > SupportLayer::onLowDetail @ 0x10039a511
//
// 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::unloadBackground(GameManager *a1)
{
char v1; // al
cocos2d::CCString *v2; // rax
const char *CString; // r15
cocos2d::CCTextureCache *v4; // rax
int i; // r14d
cocos2d::CCString *v6; // rax
const char *v7; // r15
cocos2d::CCFileUtils *v8; // rax
char v9; // [rsp-28h] [rbp-28h]
if ( a1->m_loadedBgID )
{
v2 = (cocos2d::CCString *)sub_1007AB580("game_bg_%02d_001.png", v1);
CString = cocos2d::CCString::getCString(v2);
v4 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v4, CString);
a1->m_loadedBgID = 0;
for ( i = 1; i != 60; ++i )
{
v6 = (cocos2d::CCString *)sub_1007AB580("game_bg_%02d_001.png", v9);
v7 = cocos2d::CCString::getCString(v6);
v8 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(cocos2d::CCFileUtils *, const char *))v8->createCCDictionaryWithContentsOfFile)(v8, v7);
}
}
}